Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Flipper-Zero/STM32CubeWB.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Labbene <ali.labbene@st.com>2022-12-19 18:40:10 +0300
committerEya <aya.selmi1@st.com>2023-01-30 18:58:56 +0300
commitbceb1dae09f912eae47fba059251d499ba32f4ca (patch)
tree9e4675da73ad7936f4ec44d177fdffb6ede2e6eb
parent9c2f0efe94efd420f9810108e303a9e9cf500802 (diff)
[PRJ] Remove projects using MW libraries subject to click-thru
Rationale: - MW libraries subject to click-thru have been already removed from this repo, but not the projects using them. - Building these projects, whether manually or automatically via some ACI tool would yield errors. - Particularly with daily (or nightly) builds in the frame of a CI/CD strategy, such errors would pollute the logs uselessly. Note: If needed, the removed items can be found in the full firmware package on st.com. Please refer to the README.md file for further details.
-rw-r--r--CONTRIBUTING.md41
-rw-r--r--Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h2
-rw-r--r--Middlewares/ST/STM32_Audio/Addons/PDM/readme.txt34
-rw-r--r--Middlewares/ST/STM32_Audio/README.md3
-rw-r--r--Projects/README.md3
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/EWARM/Project.ewd1419
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/EWARM/Project.ewp1328
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/EWARM/Project.eww10
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/EWARM/startup_stm32wb5mxx_cm4.s515
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/EWARM/stm32wb5mxx_flash_cm4.icf40
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Inc/main.h81
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Inc/s25fl128s_conf.h51
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Inc/stlogo.h97
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Inc/stm32wb5mm_dk_conf.h95
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Inc/stm32wbxx_hal_conf.h353
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Inc/stm32wbxx_it.h57
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Inc/usb/usbd_audio_if.h33
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Inc/usb/usbd_audio_in.h198
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Inc/usb/usbd_conf.h83
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Inc/usb/usbd_desc.h33
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/MDK-ARM/Project.uvoptx1117
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/MDK-ARM/Project.uvprojx829
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/MDK-ARM/startup_stm32wb5mxx_cm4.s367
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/MDK-ARM/stm32wb5mxx_flash_cm4.sct24
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/.cproject428
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/.project369
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/Example/Startup/startup_stm32wb5mmghx.s445
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/Example/User/syscalls.c176
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/Example/User/sysmem.c79
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/STM32WB5MMGHX_FLASH.ld171
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/lcd.c223
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/led.c135
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/main.c289
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/proximity.c173
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/qspi.c322
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/record.c174
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/sensors.c164
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/stm32wbxx_hal_msp.c70
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/stm32wbxx_it.c213
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/system_stm32wbxx.c360
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/usb/usbd_audio_if.c199
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/usb/usbd_audio_in.c989
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/usb/usbd_conf.c513
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/usb/usbd_desc.c219
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api.c2977
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api.h1943
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_calibration.c1259
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_calibration.h110
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_core.c2243
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_core.h112
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_ranging.c28
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_ranging.h33
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_strings.c448
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_strings.h266
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_def.h619
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_device.h243
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_interrupt_threshold_settings.h179
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_platform.h43
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_platform_log.c59
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_platform_log.h110
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_tof.c330
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_tof.h230
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_tuning.h131
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_types.h96
-rw-r--r--Projects/STM32WB5MM-DK/Examples/BSP/readme.txt107
-rw-r--r--README.md11
66 files changed, 40 insertions, 24061 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ee37310c9..8668d97cb 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,31 +1,40 @@
-## Contributing guide
-This document serves as a checklist before contributing to this repository.
-It includes links to read up on if topics are unclear to you.
+# Contributing guide
-This guide mainly focuses on the proper use of Git.
+This guide serves as a checklist before contributing to this repository. It mainly focuses on the steps to follow to submit an issue or a pull-request.
-### 1. Before opening an issue
-Please check the following boxes before posting an issue:
-- [ ] `Make sure you are using the latest commit (major releases are Tagged, but corrections are available as new commits).`
-- [ ] `Make sure your issue is a question/feedback/suggestions RELATED TO the software provided in this repository.` Otherwise, it should be discussed on the [ST Community/STM32 MCUs forum](https://community.st.com/s/topic/0TO0X000000BSqSWAW/stm32-mcus).
-- [ ] `Make sure your issue is not already reported/fixed on GitHub or discussed on a previous issue.` Please refer to this [dashboard](https://github.com/orgs/STMicroelectronics/projects/2) for the list of issues and pull-requests. Do not forget to browse into the **closed** issues.
+## 1. Issues
-### 2. Posting the issue
-When you have checked the previous boxes. You will find two templates (Bug Report or Other Issue) available in the **Issues** tab of this repository.
+### 1.1 Before opening an issue
+
+Please check the following points before posting an issue:
+* Make sure you are using the latest commit (major releases are tagged, but corrections are available as new commits).
+* Make sure your issue is a question/feedback/suggestions **related to** the software provided in this repository. Otherwise, please refer to section [3](CONTRIBUTING.md#3-support-requests-and-questions) below.
+* Make sure your issue is not already reported/fixed on GitHub or discussed on a previous issue. Do not forget to browse into the **closed** issues.
+
+### 1.2 Posting the issue
+
+When you have checked the previous points, create a new report from the **Issues** tab of this repository. A template is available [here](../../issues/new/choose) to help you report the issue you are facing or the enhancement you would like to propose.
+
+## 2. Pull Requests
+
+### 2.1 Before opening a pull-request
-### 3. Pull Requests
STMicrolectronics is happy to receive contributions from the community, based on an initial Contributor License Agreement (CLA) procedure.
* If you are an individual writing original source code and you are sure **you own the intellectual property**, then you need to sign an Individual [CLA](https://cla.st.com).
* If you work for a company that wants also to allow you to contribute with your work, your company needs to provide a Corporate [CLA](https://cla.st.com) mentioning your GitHub account name.
-* If you are not sure that a CLA (Individual or Corporate) has been signed for your GitHub account you can check [here](https://cla.st.com).
+* If you are not sure that a CLA (Individual or Corporate) has been signed for your GitHub account you can check the [CLA](https://cla.st.com) dedicated page.
Please note that:
* The Corporate CLA will always take precedence over the Individual CLA.
* One CLA submission is sufficient, for any project proposed by STMicroelectronics.
-#### How to proceed
+### 2.2 How to proceed
-* We recommend to engage first a communication thru an issue, in order to present your proposal. Just to confirm that it corresponds to STMicroelectronics domain or scope.
+* We recommend to engage first a communication thru an issue, in order to present your proposal, just to confirm that it corresponds to STMicroelectronics' domain or scope.
* Then fork the project to your GitHub account to further develop your contribution. Please use the latest commit version.
-* Please, submit one Pull Request for one new feature or proposal. This will ease the analysis and the final merge if accepted.
+* Please, submit one pull-request per new feature or proposal. This will ease the analysis and the final merge if accepted.
+
+## 3. Support requests and questions
+
+For support requests or any other question related to the product, the tools, the environment, you can submit a post to the **ST Community** on the appropriate topic [page](https://community.st.com/s/topiccatalog).
diff --git a/Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h b/Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
index 73380827d..730762f58 100644
--- a/Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
+++ b/Drivers/STM32WBxx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h
@@ -1291,7 +1291,7 @@ extern "C" {
#define TIM_TIM3_TI1_COMP1COMP2_OUT TIM_TIM3_TI1_COMP1_COMP2
#endif
-#if defined(STM32U5) || defined(STM32MP2)
+#if defined(STM32U5)
#define OCREF_CLEAR_SELECT_Pos OCREF_CLEAR_SELECT_POS
#define OCREF_CLEAR_SELECT_Msk OCREF_CLEAR_SELECT_MSK
#endif
diff --git a/Middlewares/ST/STM32_Audio/Addons/PDM/readme.txt b/Middlewares/ST/STM32_Audio/Addons/PDM/readme.txt
deleted file mode 100644
index ccb432e4f..000000000
--- a/Middlewares/ST/STM32_Audio/Addons/PDM/readme.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- ******************************************************************************
- * @file readme.txt
- * @author MCD Application Team
- * @brief Licensed module readme file.
- ******************************************************************************
- */
-
-This module is not directly available on GitHub as it is subject to a restrictive license (ST Ultimate Liberty).
-
-CAUTION: Some steps described below (e.g. license display, download start) may
- take a few to several seconds depending on the browser used.
-
-Please follow the steps below in order to obtain it:
-1. Click on the link below to be redirected to the MW web page on ST servers.
- https://www.st.com/en/licensed-software/audiopdm-mw.html?softwareProduct=AudioPDM-MW&softwareVersion=3.3.0
-2. The terms of the license shall be displayed on your screen (this may take a few seconds).
- Once you have read them carefully and accepted them click on the "ACCEPT" button.
-3. You will be then prompted to login/register or to provide your name and e-mail.
- Note 1: This step is necessary only in case you logged out from "st.com"
- website for more than 24 hours.
- Otherwise this step will be automatically skipped.
- Note 2: In case you have no "st.com" account and decide to register you will
- be prompted for a full registration.
- The next times however you can login simply by providing your e-mail
- address and password.
- Note 3: The other alternative as mentioned above is to provide your name and
- e-mail and click on the "Download" button (on bottom of the displayed
- dialog box). In this case, you will receive an e-mail asking you for
- confirmation.
-4. Your download shall start automatically (this may take a few seconds) or an
- "Open/Save" dialog box will be opened depending on the browser used.
- The module will be downloaded in the form of a compressed file.
- Extract its content and place it under the same folder as this readme.txt file.
diff --git a/Middlewares/ST/STM32_Audio/README.md b/Middlewares/ST/STM32_Audio/README.md
new file mode 100644
index 000000000..cf75c3aa0
--- /dev/null
+++ b/Middlewares/ST/STM32_Audio/README.md
@@ -0,0 +1,3 @@
+# This middleware library is unavailable in this repository
+
+In this repository, this middleware library **along with** the projects (demos, applications, and examples) using it, are **not available**. Please refer to the [README.md](../../../README.md#some-middleware-libraries-are-unavailable-in-this-repository) file at the root of this repository for further details.
diff --git a/Projects/README.md b/Projects/README.md
new file mode 100644
index 000000000..9d3a369a7
--- /dev/null
+++ b/Projects/README.md
@@ -0,0 +1,3 @@
+# Some projects are unavailable in this repository
+
+In this repository, some middleware libraries **along with** the projects (demos, applications, and examples) using them, are **not available**. Please refer to the [README.md](../README.md#some-middleware-libraries-are-unavailable-in-this-repository) file at the root of this repository for further details.
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/EWARM/Project.ewd b/Projects/STM32WB5MM-DK/Examples/BSP/EWARM/Project.ewd
deleted file mode 100644
index 648b58504..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/EWARM/Project.ewd
+++ /dev/null
@@ -1,1419 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project>
- <fileVersion>3</fileVersion>
- <configuration>
- <name>STM32WB5MM-DK</name>
- <toolchain>
- <name>ARM</name>
- </toolchain>
- <debug>1</debug>
- <settings>
- <name>C-SPY</name>
- <archiveVersion>2</archiveVersion>
- <data>
- <version>29</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>CInput</name>
- <state>1</state>
- </option>
- <option>
- <name>CEndian</name>
- <state>1</state>
- </option>
- <option>
- <name>CProcessor</name>
- <state>1</state>
- </option>
- <option>
- <name>OCVariant</name>
- <state>0</state>
- </option>
- <option>
- <name>MacOverride</name>
- <state>0</state>
- </option>
- <option>
- <name>MacFile</name>
- <state />
- </option>
- <option>
- <name>MemOverride</name>
- <state>0</state>
- </option>
- <option>
- <name>MemFile</name>
- <state />
- </option>
- <option>
- <name>RunToEnable</name>
- <state>1</state>
- </option>
- <option>
- <name>RunToName</name>
- <state>main</state>
- </option>
- <option>
- <name>CExtraOptionsCheck</name>
- <state>0</state>
- </option>
- <option>
- <name>CExtraOptions</name>
- <state />
- </option>
- <option>
- <name>CFpuProcessor</name>
- <state>1</state>
- </option>
- <option>
- <name>OCDDFArgumentProducer</name>
- <state />
- </option>
- <option>
- <name>OCDownloadSuppressDownload</name>
- <state>0</state>
- </option>
- <option>
- <name>OCDownloadVerifyAll</name>
- <state>1</state>
- </option>
- <option>
- <name>OCProductVersion</name>
- <state>7.10.3.6927</state>
- </option>
- <option>
- <name>OCDynDriverList</name>
- <state>STLINK_ID</state>
- </option>
- <option>
- <name>OCLastSavedByProductVersion</name>
- <state>8.20.1.14181</state>
- </option>
- <option>
- <name>UseFlashLoader</name>
- <state>1</state>
- </option>
- <option>
- <name>CLowLevel</name>
- <state>1</state>
- </option>
- <option>
- <name>OCBE8Slave</name>
- <state>1</state>
- </option>
- <option>
- <name>MacFile2</name>
- <state />
- </option>
- <option>
- <name>CDevice</name>
- <state>1</state>
- </option>
- <option>
- <name>FlashLoadersV3</name>
- <state />
- </option>
- <option>
- <name>OCImagesSuppressCheck1</name>
- <state>0</state>
- </option>
- <option>
- <name>OCImagesPath1</name>
- <state />
- </option>
- <option>
- <name>OCImagesSuppressCheck2</name>
- <state>0</state>
- </option>
- <option>
- <name>OCImagesPath2</name>
- <state />
- </option>
- <option>
- <name>OCImagesSuppressCheck3</name>
- <state>0</state>
- </option>
- <option>
- <name>OCImagesPath3</name>
- <state />
- </option>
- <option>
- <name>OverrideDefFlashBoard</name>
- <state>0</state>
- </option>
- <option>
- <name>OCImagesOffset1</name>
- <state />
- </option>
- <option>
- <name>OCImagesOffset2</name>
- <state />
- </option>
- <option>
- <name>OCImagesOffset3</name>
- <state />
- </option>
- <option>
- <name>OCImagesUse1</name>
- <state>0</state>
- </option>
- <option>
- <name>OCImagesUse2</name>
- <state>0</state>
- </option>
- <option>
- <name>OCImagesUse3</name>
- <state>0</state>
- </option>
- <option>
- <name>OCDeviceConfigMacroFile</name>
- <state>1</state>
- </option>
- <option>
- <name>OCDebuggerExtraOption</name>
- <state>1</state>
- </option>
- <option>
- <name>OCAllMTBOptions</name>
- <state>1</state>
- </option>
- <option>
- <name>OCMulticoreNrOfCores</name>
- <state>1</state>
- </option>
- <option>
- <name>OCMulticoreMaster</name>
- <state>0</state>
- </option>
- <option>
- <name>OCMulticorePort</name>
- <state>53461</state>
- </option>
- <option>
- <name>OCMulticoreWorkspace</name>
- <state />
- </option>
- <option>
- <name>OCMulticoreSlaveProject</name>
- <state />
- </option>
- <option>
- <name>OCMulticoreSlaveConfiguration</name>
- <state />
- </option>
- <option>
- <name>OCDownloadExtraImage</name>
- <state>1</state>
- </option>
- <option>
- <name>OCAttachSlave</name>
- <state>0</state>
- </option>
- <option>
- <name>MassEraseBeforeFlashing</name>
- <state>0</state>
- </option>
- </data>
- </settings>
- <settings>
- <name>ARMSIM_ID</name>
- <archiveVersion>2</archiveVersion>
- <data>
- <version>1</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>OCSimDriverInfo</name>
- <state>1</state>
- </option>
- <option>
- <name>OCSimEnablePSP</name>
- <state>0</state>
- </option>
- <option>
- <name>OCSimPspOverrideConfig</name>
- <state>0</state>
- </option>
- <option>
- <name>OCSimPspConfigFile</name>
- <state />
- </option>
- </data>
- </settings>
- <settings>
- <name>CADI_ID</name>
- <archiveVersion>2</archiveVersion>
- <data>
- <version>0</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>CCadiMemory</name>
- <state>1</state>
- </option>
- <option>
- <name>Fast Model</name>
- <state />
- </option>
- <option>
- <name>CCADILogFileCheck</name>
- <state>0</state>
- </option>
- <option>
- <name>CCADILogFileEditB</name>
- <state>$PROJ_DIR$\cspycomm.log</state>
- </option>
- <option>
- <name>OCDriverInfo</name>
- <state>1</state>
- </option>
- </data>
- </settings>
- <settings>
- <name>CMSISDAP_ID</name>
- <archiveVersion>2</archiveVersion>
- <data>
- <version>4</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>CatchSFERR</name>
- <state>1</state>
- </option>
- <option>
- <name>OCDriverInfo</name>
- <state>1</state>
- </option>
- <option>
- <name>OCIarProbeScriptFile</name>
- <state>1</state>
- </option>
- <option>
- <name>CMSISDAPResetList</name>
- <version>1</version>
- <state>10</state>
- </option>
- <option>
- <name>CMSISDAPHWResetDuration</name>
- <state>300</state>
- </option>
- <option>
- <name>CMSISDAPHWResetDelay</name>
- <state>200</state>
- </option>
- <option>
- <name>CMSISDAPDoLogfile</name>
- <state>0</state>
- </option>
- <option>
- <name>CMSISDAPLogFile</name>
- <state>$PROJ_DIR$\cspycomm.log</state>
- </option>
- <option>
- <name>CMSISDAPInterfaceRadio</name>
- <state>0</state>
- </option>
- <option>
- <name>CMSISDAPInterfaceCmdLine</name>
- <state>0</state>
- </option>
- <option>
- <name>CMSISDAPMultiTargetEnable</name>
- <state>0</state>
- </option>
- <option>
- <name>CMSISDAPMultiTarget</name>
- <state>0</state>
- </option>
- <option>
- <name>CMSISDAPJtagSpeedList</name>
- <version>0</version>
- <state>0</state>
- </option>
- <option>
- <name>CMSISDAPBreakpointRadio</name>
- <state>0</state>
- </option>
- <option>
- <name>CMSISDAPRestoreBreakpointsCheck</name>
- <state>0</state>
- </option>
- <option>
- <name>CMSISDAPUpdateBreakpointsEdit</name>
- <state>_call_main</state>
- </option>
- <option>
- <name>RDICatchReset</name>
- <state>0</state>
- </option>
- <option>
- <name>RDICatchUndef</name>
- <state>1</state>
- </option>
- <option>
- <name>RDICatchSWI</name>
- <state>0</state>
- </option>
- <option>
- <name>RDICatchData</name>
- <state>1</state>
- </option>
- <option>
- <name>RDICatchPrefetch</name>
- <state>1</state>
- </option>
- <option>
- <name>RDICatchIRQ</name>
- <state>0</state>
- </option>
- <option>
- <name>RDICatchFIQ</name>
- <state>0</state>
- </option>
- <option>
- <name>CatchCORERESET</name>
- <state>0</state>
- </option>
- <option>
- <name>CatchMMERR</name>
- <state>1</state>
- </option>
- <option>
- <name>CatchNOCPERR</name>
- <state>1</state>
- </option>
- <option>
- <name>CatchCHKERR</name>
- <state>1</state>
- </option>
- <option>
- <name>CatchSTATERR</name>
- <state>1</state>
- </option>
- <option>
- <name>CatchBUSERR</name>
- <state>1</state>
- </option>
- <option>
- <name>CatchINTERR</name>
- <state>1</state>
- </option>
- <option>
- <name>CatchHARDERR</name>
- <state>1</state>
- </option>
- <option>
- <name>CatchDummy</name>
- <state>0</state>
- </option>
- <option>
- <name>CMSISDAPMultiCPUEnable</name>
- <state>0</state>
- </option>
- <option>
- <name>CMSISDAPMultiCPUNumber</name>
- <state>0</state>
- </option>
- <option>
- <name>OCProbeCfgOverride</name>
- <state>0</state>
- </option>
- <option>
- <name>OCProbeConfig</name>
- <state />
- </option>
- <option>
- <name>CMSISDAPProbeConfigRadio</name>
- <state>0</state>
- </option>
- <option>
- <name>CMSISDAPSelectedCPUBehaviour</name>
- <state>0</state>
- </option>
- <option>
- <name>ICpuName</name>
- <state />
- </option>
- <option>
- <name>OCJetEmuParams</name>
- <state>1</state>
- </option>
- <option>
- <name>CCCMSISDAPUsbSerialNo</name>
- <state />
- </option>
- <option>
- <name>CCCMSISDAPUsbSerialNoSelect</name>
- <state>0</state>
- </option>
- </data>
- </settings>
- <settings>
- <name>GDBSERVER_ID</name>
- <archiveVersion>2</archiveVersion>
- <data>
- <version>0</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>OCDriverInfo</name>
- <state>1</state>
- </option>
- <option>
- <name>TCPIP</name>
- <state>aaa.bbb.ccc.ddd</state>
- </option>
- <option>
- <name>DoLogfile</name>
- <state>0</state>
- </option>
- <option>
- <name>LogFile</name>
- <state>$PROJ_DIR$\cspycomm.log</state>
- </option>
- <option>
- <name>CCJTagBreakpointRadio</name>
- <state>0</state>
- </option>
- <option>
- <name>CCJTagDoUpdateBreakpoints</name>
- <state>0</state>
- </option>
- <option>
- <name>CCJTagUpdateBreakpoints</name>
- <state>_call_main</state>
- </option>
- </data>
- </settings>
- <settings>
- <name>IJET_ID</name>
- <archiveVersion>2</archiveVersion>
- <data>
- <version>8</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>CatchSFERR</name>
- <state>1</state>
- </option>
- <option>
- <name>OCDriverInfo</name>
- <state>1</state>
- </option>
- <option>
- <name>OCIarProbeScriptFile</name>
- <state>1</state>
- </option>
- <option>
- <name>IjetResetList</name>
- <version>1</version>
- <state>10</state>
- </option>
- <option>
- <name>IjetHWResetDuration</name>
- <state>300</state>
- </option>
- <option>
- <name>IjetHWResetDelay</name>
- <state>200</state>
- </option>
- <option>
- <name>IjetPowerFromProbe</name>
- <state>1</state>
- </option>
- <option>
- <name>IjetPowerRadio</name>
- <state>0</state>
- </option>
- <option>
- <name>IjetDoLogfile</name>
- <state>0</state>
- </option>
- <option>
- <name>IjetLogFile</name>
- <state>$PROJ_DIR$\cspycomm.log</state>
- </option>
- <option>
- <name>IjetInterfaceRadio</name>
- <state>0</state>
- </option>
- <option>
- <name>IjetInterfaceCmdLine</name>
- <state>0</state>
- </option>
- <option>
- <name>IjetMultiTargetEnable</name>
- <state>0</state>
- </option>
- <option>
- <name>IjetMultiTarget</name>
- <state>0</state>
- </option>
- <option>
- <name>IjetScanChainNonARMDevices</name>
- <state>0</state>
- </option>
- <option>
- <name>IjetIRLength</name>
- <state>0</state>
- </option>
- <option>
- <name>IjetJtagSpeedList</name>
- <version>0</version>
- <state>0</state>
- </option>
- <option>
- <name>IjetProtocolRadio</name>
- <state>0</state>
- </option>
- <option>
- <name>IjetSwoPin</name>
- <state>0</state>
- </option>
- <option>
- <name>IjetCpuClockEdit</name>
- <state>72.0</state>
- </option>
- <option>
- <name>IjetSwoPrescalerList</name>
- <version>1</version>
- <state>0</state>
- </option>
- <option>
- <name>IjetBreakpointRadio</name>
- <state>0</state>
- </option>
- <option>
- <name>IjetRestoreBreakpointsCheck</name>
- <state>0</state>
- </option>
- <option>
- <name>IjetUpdateBreakpointsEdit</name>
- <state>_call_main</state>
- </option>
- <option>
- <name>RDICatchReset</name>
- <state>0</state>
- </option>
- <option>
- <name>RDICatchUndef</name>
- <state>1</state>
- </option>
- <option>
- <name>RDICatchSWI</name>
- <state>0</state>
- </option>
- <option>
- <name>RDICatchData</name>
- <state>1</state>
- </option>
- <option>
- <name>RDICatchPrefetch</name>
- <state>1</state>
- </option>
- <option>
- <name>RDICatchIRQ</name>
- <state>0</state>
- </option>
- <option>
- <name>RDICatchFIQ</name>
- <state>0</state>
- </option>
- <option>
- <name>CatchCORERESET</name>
- <state>0</state>
- </option>
- <option>
- <name>CatchMMERR</name>
- <state>1</state>
- </option>
- <option>
- <name>CatchNOCPERR</name>
- <state>1</state>
- </option>
- <option>
- <name>CatchCHKERR</name>
- <state>1</state>
- </option>
- <option>
- <name>CatchSTATERR</name>
- <state>1</state>
- </option>
- <option>
- <name>CatchBUSERR</name>
- <state>1</state>
- </option>
- <option>
- <name>CatchINTERR</name>
- <state>1</state>
- </option>
- <option>
- <name>CatchHARDERR</name>
- <state>1</state>
- </option>
- <option>
- <name>CatchDummy</name>
- <state>0</state>
- </option>
- <option>
- <name>OCProbeCfgOverride</name>
- <state>0</state>
- </option>
- <option>
- <name>OCProbeConfig</name>
- <state />
- </option>
- <option>
- <name>IjetProbeConfigRadio</name>
- <state>0</state>
- </option>
- <option>
- <name>IjetMultiCPUEnable</name>
- <state>0</state>
- </option>
- <option>
- <name>IjetMultiCPUNumber</name>
- <state>0</state>
- </option>
- <option>
- <name>IjetSelectedCPUBehaviour</name>
- <state>0</state>
- </option>
- <option>
- <name>ICpuName</name>
- <state />
- </option>
- <option>
- <name>OCJetEmuParams</name>
- <state>1</state>
- </option>
- <option>
- <name>IjetPreferETB</name>
- <state>1</state>
- </option>
- <option>
- <name>IjetTraceSettingsList</name>
- <version>0</version>
- <state>0</state>
- </option>
- <option>
- <name>IjetTraceSizeList</name>
- <version>0</version>
- <state>4</state>
- </option>
- <option>
- <name>FlashBoardPathSlave</name>
- <state>0</state>
- </option>
- <option>
- <name>CCIjetUsbSerialNo</name>
- <state />
- </option>
- <option>
- <name>CCIjetUsbSerialNoSelect</name>
- <state>0</state>
- </option>
- </data>
- </settings>
- <settings>
- <name>JLINK_ID</name>
- <archiveVersion>2</archiveVersion>
- <data>
- <version>16</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>CCCatchSFERR</name>
- <state>0</state>
- </option>
- <option>
- <name>JLinkSpeed</name>
- <state>1000</state>
- </option>
- <option>
- <name>CCJLinkDoLogfile</name>
- <state>0</state>
- </option>
- <option>
- <name>CCJLinkLogFile</name>
- <state>$PROJ_DIR$\cspycomm.log</state>
- </option>
- <option>
- <name>CCJLinkHWResetDelay</name>
- <state>0</state>
- </option>
- <option>
- <name>OCDriverInfo</name>
- <state>1</state>
- </option>
- <option>
- <name>JLinkInitialSpeed</name>
- <state>1000</state>
- </option>
- <option>
- <name>CCDoJlinkMultiTarget</name>
- <state>0</state>
- </option>
- <option>
- <name>CCScanChainNonARMDevices</name>
- <state>0</state>
- </option>
- <option>
- <name>CCJLinkMultiTarget</name>
- <state>0</state>
- </option>
- <option>
- <name>CCJLinkIRLength</name>
- <state>0</state>
- </option>
- <option>
- <name>CCJLinkCommRadio</name>
- <state>0</state>
- </option>
- <option>
- <name>CCJLinkTCPIP</name>
- <state>aaa.bbb.ccc.ddd</state>
- </option>
- <option>
- <name>CCJLinkSpeedRadioV2</name>
- <state>0</state>
- </option>
- <option>
- <name>CCUSBDevice</name>
- <version>1</version>
- <state>1</state>
- </option>
- <option>
- <name>CCRDICatchReset</name>
- <state>0</state>
- </option>
- <option>
- <name>CCRDICatchUndef</name>
- <state>0</state>
- </option>
- <option>
- <name>CCRDICatchSWI</name>
- <state>0</state>
- </option>
- <option>
- <name>CCRDICatchData</name>
- <state>0</state>
- </option>
- <option>
- <name>CCRDICatchPrefetch</name>
- <state>0</state>
- </option>
- <option>
- <name>CCRDICatchIRQ</name>
- <state>0</state>
- </option>
- <option>
- <name>CCRDICatchFIQ</name>
- <state>0</state>
- </option>
- <option>
- <name>CCJLinkBreakpointRadio</name>
- <state>0</state>
- </option>
- <option>
- <name>CCJLinkDoUpdateBreakpoints</name>
- <state>0</state>
- </option>
- <option>
- <name>CCJLinkUpdateBreakpoints</name>
- <state>_call_main</state>
- </option>
- <option>
- <name>CCJLinkInterfaceRadio</name>
- <state>0</state>
- </option>
- <option>
- <name>CCJLinkResetList</name>
- <version>6</version>
- <state>7</state>
- </option>
- <option>
- <name>CCJLinkInterfaceCmdLine</name>
- <state>0</state>
- </option>
- <option>
- <name>CCCatchCORERESET</name>
- <state>0</state>
- </option>
- <option>
- <name>CCCatchMMERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCCatchNOCPERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCCatchCHRERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCCatchSTATERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCCatchBUSERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCCatchINTERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCCatchHARDERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCCatchDummy</name>
- <state>0</state>
- </option>
- <option>
- <name>OCJLinkScriptFile</name>
- <state>1</state>
- </option>
- <option>
- <name>CCJLinkUsbSerialNo</name>
- <state />
- </option>
- <option>
- <name>CCTcpIpAlt</name>
- <version>0</version>
- <state>0</state>
- </option>
- <option>
- <name>CCJLinkTcpIpSerialNo</name>
- <state />
- </option>
- <option>
- <name>CCCpuClockEdit</name>
- <state>72.0</state>
- </option>
- <option>
- <name>CCSwoClockAuto</name>
- <state>0</state>
- </option>
- <option>
- <name>CCSwoClockEdit</name>
- <state>2000</state>
- </option>
- <option>
- <name>OCJLinkTraceSource</name>
- <state>0</state>
- </option>
- <option>
- <name>OCJLinkTraceSourceDummy</name>
- <state>0</state>
- </option>
- <option>
- <name>OCJLinkDeviceName</name>
- <state>1</state>
- </option>
- </data>
- </settings>
- <settings>
- <name>LMIFTDI_ID</name>
- <archiveVersion>2</archiveVersion>
- <data>
- <version>2</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>OCDriverInfo</name>
- <state>1</state>
- </option>
- <option>
- <name>LmiftdiSpeed</name>
- <state>500</state>
- </option>
- <option>
- <name>CCLmiftdiDoLogfile</name>
- <state>0</state>
- </option>
- <option>
- <name>CCLmiftdiLogFile</name>
- <state>$PROJ_DIR$\cspycomm.log</state>
- </option>
- <option>
- <name>CCLmiFtdiInterfaceRadio</name>
- <state>0</state>
- </option>
- <option>
- <name>CCLmiFtdiInterfaceCmdLine</name>
- <state>0</state>
- </option>
- </data>
- </settings>
- <settings>
- <name>PEMICRO_ID</name>
- <archiveVersion>2</archiveVersion>
- <data>
- <version>3</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>OCDriverInfo</name>
- <state>1</state>
- </option>
- <option>
- <name>CCJPEMicroShowSettings</name>
- <state>0</state>
- </option>
- <option>
- <name>DoLogfile</name>
- <state>0</state>
- </option>
- <option>
- <name>LogFile</name>
- <state>$PROJ_DIR$\cspycomm.log</state>
- </option>
- </data>
- </settings>
- <settings>
- <name>STLINK_ID</name>
- <archiveVersion>2</archiveVersion>
- <data>
- <version>4</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>OCDriverInfo</name>
- <state>1</state>
- </option>
- <option>
- <name>CCSTLinkInterfaceRadio</name>
- <state>1</state>
- </option>
- <option>
- <name>CCSTLinkInterfaceCmdLine</name>
- <state>0</state>
- </option>
- <option>
- <name>CCSTLinkResetList</name>
- <version>3</version>
- <state>4</state>
- </option>
- <option>
- <name>CCCpuClockEdit</name>
- <state>32.0</state>
- </option>
- <option>
- <name>CCSwoClockAuto</name>
- <state>0</state>
- </option>
- <option>
- <name>CCSwoClockEdit</name>
- <state>2000</state>
- </option>
- <option>
- <name>DoLogfile</name>
- <state>0</state>
- </option>
- <option>
- <name>LogFile</name>
- <state>$PROJ_DIR$\cspycomm.log</state>
- </option>
- <option>
- <name>CCSTLinkDoUpdateBreakpoints</name>
- <state>0</state>
- </option>
- <option>
- <name>CCSTLinkUpdateBreakpoints</name>
- <state>_call_main</state>
- </option>
- <option>
- <name>CCSTLinkCatchCORERESET</name>
- <state>0</state>
- </option>
- <option>
- <name>CCSTLinkCatchMMERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCSTLinkCatchNOCPERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCSTLinkCatchCHRERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCSTLinkCatchSTATERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCSTLinkCatchBUSERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCSTLinkCatchINTERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCSTLinkCatchSFERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCSTLinkCatchHARDERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCSTLinkCatchDummy</name>
- <state>0</state>
- </option>
- <option>
- <name>CCSTLinkUsbSerialNo</name>
- <state />
- </option>
- <option>
- <name>CCSTLinkUsbSerialNoSelect</name>
- <state>0</state>
- </option>
- <option>
- <name>CCSTLinkJtagSpeedList</name>
- <version>0</version>
- <state>0</state>
- </option>
- <option>
- <name>CCSTLinkDAPNumber</name>
- <state />
- </option>
- <option>
- <name>CCSTLinkDebugAccessPortRadio</name>
- <state>0</state>
- </option>
- </data>
- </settings>
- <settings>
- <name>THIRDPARTY_ID</name>
- <archiveVersion>2</archiveVersion>
- <data>
- <version>0</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>CThirdPartyDriverDll</name>
- <state>###Uninitialized###</state>
- </option>
- <option>
- <name>CThirdPartyLogFileCheck</name>
- <state>0</state>
- </option>
- <option>
- <name>CThirdPartyLogFileEditB</name>
- <state>$PROJ_DIR$\cspycomm.log</state>
- </option>
- <option>
- <name>OCDriverInfo</name>
- <state>1</state>
- </option>
- </data>
- </settings>
- <settings>
- <name>TIFET_ID</name>
- <archiveVersion>2</archiveVersion>
- <data>
- <version>1</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>OCDriverInfo</name>
- <state>1</state>
- </option>
- <option>
- <name>CCMSPFetResetList</name>
- <version>0</version>
- <state>0</state>
- </option>
- <option>
- <name>CCMSPFetInterfaceRadio</name>
- <state>0</state>
- </option>
- <option>
- <name>CCMSPFetInterfaceCmdLine</name>
- <state>0</state>
- </option>
- <option>
- <name>CCMSPFetTargetVccTypeDefault</name>
- <state>0</state>
- </option>
- <option>
- <name>CCMSPFetTargetVoltage</name>
- <state>###Uninitialized###</state>
- </option>
- <option>
- <name>CCMSPFetVCCDefault</name>
- <state>1</state>
- </option>
- <option>
- <name>CCMSPFetTargetSettlingtime</name>
- <state>0</state>
- </option>
- <option>
- <name>CCMSPFetRadioJtagSpeedType</name>
- <state>1</state>
- </option>
- <option>
- <name>CCMSPFetConnection</name>
- <version>0</version>
- <state>0</state>
- </option>
- <option>
- <name>CCMSPFetUsbComPort</name>
- <state>Automatic</state>
- </option>
- <option>
- <name>CCMSPFetAllowAccessToBSL</name>
- <state>0</state>
- </option>
- <option>
- <name>CCMSPFetDoLogfile</name>
- <state>0</state>
- </option>
- <option>
- <name>CCMSPFetLogFile</name>
- <state>$PROJ_DIR$\cspycomm.log</state>
- </option>
- <option>
- <name>CCMSPFetRadioEraseFlash</name>
- <state>1</state>
- </option>
- </data>
- </settings>
- <settings>
- <name>XDS100_ID</name>
- <archiveVersion>2</archiveVersion>
- <data>
- <version>6</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>OCDriverInfo</name>
- <state>1</state>
- </option>
- <option>
- <name>TIPackageOverride</name>
- <state>0</state>
- </option>
- <option>
- <name>TIPackage</name>
- <state />
- </option>
- <option>
- <name>BoardFile</name>
- <state />
- </option>
- <option>
- <name>DoLogfile</name>
- <state>0</state>
- </option>
- <option>
- <name>LogFile</name>
- <state>$PROJ_DIR$\cspycomm.log</state>
- </option>
- <option>
- <name>CCXds100BreakpointRadio</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100DoUpdateBreakpoints</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100UpdateBreakpoints</name>
- <state>_call_main</state>
- </option>
- <option>
- <name>CCXds100CatchReset</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100CatchUndef</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100CatchSWI</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100CatchData</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100CatchPrefetch</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100CatchIRQ</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100CatchFIQ</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100CatchCORERESET</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100CatchMMERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100CatchNOCPERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100CatchCHRERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100CatchSTATERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100CatchBUSERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100CatchINTERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100CatchSFERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100CatchHARDERR</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100CatchDummy</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100CpuClockEdit</name>
- <state />
- </option>
- <option>
- <name>CCXds100SwoClockAuto</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100SwoClockEdit</name>
- <state>1000</state>
- </option>
- <option>
- <name>CCXds100HWResetDelay</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100ResetList</name>
- <version>0</version>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100UsbSerialNo</name>
- <state />
- </option>
- <option>
- <name>CCXds100UsbSerialNoSelect</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100JtagSpeedList</name>
- <version>0</version>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100InterfaceRadio</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100InterfaceCmdLine</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100ProbeList</name>
- <version>0</version>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100SWOPortRadio</name>
- <state>0</state>
- </option>
- <option>
- <name>CCXds100SWOPort</name>
- <state>1</state>
- </option>
- </data>
- </settings>
- <debuggerPlugins>
- <plugin>
- <file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin</file>
- <loadFlag>0</loadFlag>
- </plugin>
- <plugin>
- <file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin</file>
- <loadFlag>0</loadFlag>
- </plugin>
- <plugin>
- <file>$TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin</file>
- <loadFlag>0</loadFlag>
- </plugin>
- <plugin>
- <file>$TOOLKIT_DIR$\plugins\rtos\Mbed\MbedArmPlugin.ENU.ewplugin</file>
- <loadFlag>0</loadFlag>
- </plugin>
- <plugin>
- <file>$TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin</file>
- <loadFlag>0</loadFlag>
- </plugin>
- <plugin>
- <file>$TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin</file>
- <loadFlag>0</loadFlag>
- </plugin>
- <plugin>
- <file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin</file>
- <loadFlag>0</loadFlag>
- </plugin>
- <plugin>
- <file>$TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin</file>
- <loadFlag>0</loadFlag>
- </plugin>
- <plugin>
- <file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin</file>
- <loadFlag>0</loadFlag>
- </plugin>
- <plugin>
- <file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin</file>
- <loadFlag>0</loadFlag>
- </plugin>
- <plugin>
- <file>$TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin</file>
- <loadFlag>0</loadFlag>
- </plugin>
- <plugin>
- <file>$EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin</file>
- <loadFlag>1</loadFlag>
- </plugin>
- <plugin>
- <file>$EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin</file>
- <loadFlag>0</loadFlag>
- </plugin>
- <plugin>
- <file>$EW_DIR$\common\plugins\TargetAccessServer\TargetAccessServer.ENU.ewplugin</file>
- <loadFlag>0</loadFlag>
- </plugin>
- <plugin>
- <file>$EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin</file>
- <loadFlag>0</loadFlag>
- </plugin>
- </debuggerPlugins>
- </configuration>
-</project>
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/EWARM/Project.ewp b/Projects/STM32WB5MM-DK/Examples/BSP/EWARM/Project.ewp
deleted file mode 100644
index e0e5ca765..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/EWARM/Project.ewp
+++ /dev/null
@@ -1,1328 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project>
- <fileVersion>3</fileVersion>
- <configuration>
- <name>STM32WB5MM-DK</name>
- <toolchain>
- <name>ARM</name>
- </toolchain>
- <debug>1</debug>
- <settings>
- <name>General</name>
- <archiveVersion>3</archiveVersion>
- <data>
- <version>30</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>ExePath</name>
- <state>STM32WB5MM-DK\Exe</state>
- </option>
- <option>
- <name>ObjPath</name>
- <state>STM32WB5MM-DK\Obj</state>
- </option>
- <option>
- <name>ListPath</name>
- <state>STM32WB5MM-DK\List</state>
- </option>
- <option>
- <name>GEndianMode</name>
- <state>0</state>
- </option>
- <option>
- <name>Input description</name>
- <state>Full formatting, with multibyte support.</state>
- </option>
- <option>
- <name>Output description</name>
- <state>Full formatting, with multibyte support.</state>
- </option>
- <option>
- <name>GOutputBinary</name>
- <state>0</state>
- </option>
- <option>
- <name>OGCoreOrChip</name>
- <state>1</state>
- </option>
- <option>
- <name>GRuntimeLibSelect</name>
- <version>0</version>
- <state>2</state>
- </option>
- <option>
- <name>GRuntimeLibSelectSlave</name>
- <version>0</version>
- <state>2</state>
- </option>
- <option>
- <name>RTDescription</name>
- <state>Use the full configuration of the C/C++ runtime library. Full locale interface, C locale, file descriptor support, multibytes in printf and scanf, and hex floats in strtod.</state>
- </option>
- <option>
- <name>OGProductVersion</name>
- <state>4.41A</state>
- </option>
- <option>
- <name>OGLastSavedByProductVersion</name>
- <state>8.20.2.14834</state>
- </option>
- <option>
- <name>GeneralEnableMisra</name>
- <state>0</state>
- </option>
- <option>
- <name>GeneralMisraVerbose</name>
- <state>0</state>
- </option>
- <option>
- <name>OGChipSelectEditMenu</name>
- <state>STM32WB5MMG ST STM32WB5MMG</state>
- </option>
- <option>
- <name>GenLowLevelInterface</name>
- <state>1</state>
- </option>
- <option>
- <name>GEndianModeBE</name>
- <state>1</state>
- </option>
- <option>
- <name>OGBufferedTerminalOutput</name>
- <state>0</state>
- </option>
- <option>
- <name>GenStdoutInterface</name>
- <state>0</state>
- </option>
- <option>
- <name>GeneralMisraRules98</name>
- <version>0</version>
- <state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
- </option>
- <option>
- <name>GeneralMisraVer</name>
- <state>0</state>
- </option>
- <option>
- <name>GeneralMisraRules04</name>
- <version>0</version>
- <state>011111111111111110111111111111011111111111111011110100111111111111111111111111111111111111111111101111111111111011111111111111111111111111111</state>
- </option>
- <option>
- <name>RTConfigPath2</name>
- <state>$TOOLKIT_DIR$\INC\c\DLib_Config_Full.h</state>
- </option>
- <option>
- <name>GBECoreSlave</name>
- <version>26</version>
- <state>39</state>
- </option>
- <option>
- <name>OGUseCmsis</name>
- <state>0</state>
- </option>
- <option>
- <name>OGUseCmsisDspLib</name>
- <state>0</state>
- </option>
- <option>
- <name>GRuntimeLibThreads</name>
- <state>0</state>
- </option>
- <option>
- <name>CoreVariant</name>
- <version>26</version>
- <state>39</state>
- </option>
- <option>
- <name>GFPUDeviceSlave</name>
- <state>STM32WB5MMG ST STM32WB5MMG</state>
- </option>
- <option>
- <name>FPU2</name>
- <version>0</version>
- <state>4</state>
- </option>
- <option>
- <name>NrRegs</name>
- <version>0</version>
- <state>1</state>
- </option>
- <option>
- <name>NEON</name>
- <state>0</state>
- </option>
- <option>
- <name>GFPUCoreSlave2</name>
- <version>26</version>
- <state>39</state>
- </option>
- <option>
- <name>OGCMSISPackSelectDevice</name>
- </option>
- <option>
- <name>OgLibHeap</name>
- <state>0</state>
- </option>
- <option>
- <name>OGLibAdditionalLocale</name>
- <state>0</state>
- </option>
- <option>
- <name>OGPrintfVariant</name>
- <version>0</version>
- <state>1</state>
- </option>
- <option>
- <name>OGPrintfMultibyteSupport</name>
- <state>1</state>
- </option>
- <option>
- <name>OGScanfVariant</name>
- <version>0</version>
- <state>1</state>
- </option>
- <option>
- <name>OGScanfMultibyteSupport</name>
- <state>1</state>
- </option>
- <option>
- <name>GenLocaleTags</name>
- <state></state>
- </option>
- <option>
- <name>GenLocaleDisplayOnly</name>
- <state></state>
- </option>
- <option>
- <name>DSPExtension</name>
- <state>1</state>
- </option>
- <option>
- <name>TrustZone</name>
- <state>0</state>
- </option>
- </data>
- </settings>
- <settings>
- <name>ICCARM</name>
- <archiveVersion>2</archiveVersion>
- <data>
- <version>34</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>CCOptimizationNoSizeConstraints</name>
- <state>0</state>
- </option>
- <option>
- <name>CCDefines</name>
- <state>STM32WB5Mxx</state>
- <state>STM32WB55xx</state>
- <state>USE_HAL_DRIVER</state>
- <state>USE_STM32WB5M_DK</state>
- <state>CORE_CM4</state>
- <state>ARM_MATH_CM4</state>
- <state>USE_USB_FS</state>
- </option>
- <option>
- <name>CCPreprocFile</name>
- <state>0</state>
- </option>
- <option>
- <name>CCPreprocComments</name>
- <state>0</state>
- </option>
- <option>
- <name>CCPreprocLine</name>
- <state>0</state>
- </option>
- <option>
- <name>CCListCFile</name>
- <state>0</state>
- </option>
- <option>
- <name>CCListCMnemonics</name>
- <state>0</state>
- </option>
- <option>
- <name>CCListCMessages</name>
- <state>0</state>
- </option>
- <option>
- <name>CCListAssFile</name>
- <state>0</state>
- </option>
- <option>
- <name>CCListAssSource</name>
- <state>0</state>
- </option>
- <option>
- <name>CCEnableRemarks</name>
- <state>0</state>
- </option>
- <option>
- <name>CCDiagSuppress</name>
- <state></state>
- </option>
- <option>
- <name>CCDiagRemark</name>
- <state></state>
- </option>
- <option>
- <name>CCDiagWarning</name>
- <state></state>
- </option>
- <option>
- <name>CCDiagError</name>
- <state></state>
- </option>
- <option>
- <name>CCObjPrefix</name>
- <state>1</state>
- </option>
- <option>
- <name>CCAllowList</name>
- <version>1</version>
- <state>11111110</state>
- </option>
- <option>
- <name>CCDebugInfo</name>
- <state>1</state>
- </option>
- <option>
- <name>IEndianMode</name>
- <state>1</state>
- </option>
- <option>
- <name>IProcessor</name>
- <state>1</state>
- </option>
- <option>
- <name>IExtraOptionsCheck</name>
- <state>0</state>
- </option>
- <option>
- <name>IExtraOptions</name>
- <state></state>
- </option>
- <option>
- <name>CCLangConformance</name>
- <state>0</state>
- </option>
- <option>
- <name>CCSignedPlainChar</name>
- <state>1</state>
- </option>
- <option>
- <name>CCRequirePrototypes</name>
- <state>1</state>
- </option>
- <option>
- <name>CCDiagWarnAreErr</name>
- <state>0</state>
- </option>
- <option>
- <name>CCCompilerRuntimeInfo</name>
- <state>0</state>
- </option>
- <option>
- <name>IFpuProcessor</name>
- <state>1</state>
- </option>
- <option>
- <name>OutputFile</name>
- <state>$FILE_BNAME$.o</state>
- </option>
- <option>
- <name>CCLibConfigHeader</name>
- <state>1</state>
- </option>
- <option>
- <name>PreInclude</name>
- <state></state>
- </option>
- <option>
- <name>CompilerMisraOverride</name>
- <state>0</state>
- </option>
- <option>
- <name>CCIncludePath2</name>
- <state>$PROJ_DIR$\..\Inc</state>
- <state>$PROJ_DIR$\..\Src\vl53l0x</state>
- <state>$PROJ_DIR$\..\..\..\..\..\Drivers\CMSIS\Include</state>
- <state>$PROJ_DIR$\..\..\..\..\..\Drivers\CMSIS\Device\ST\STM32WBxx\Include</state>
- <state>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Inc</state>
- <state>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\STM32WB5MM-DK</state>
- <state>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\Components\Common</state>
- <state>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\Components\ism330dhcx</state>
- <state>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\Components\s25fl128s</state>
- <state>$PROJ_DIR$\..\..\..\..\..\Utilities\LCD</state>
- <state>$PROJ_DIR$\..\..\..\..\..\Middlewares\ST\STM32_Audio\Addons\PDM\Inc</state>
- <state>$PROJ_DIR$\..\Inc\usb</state>
- <state>$PROJ_DIR$\..\..\..\..\..\Middlewares\ST\STM32_USB_Device_Library\Core\Inc</state>
- <state>$PROJ_DIR$\..\..\..\..\..\Drivers\CMSIS\DSP\Source\FilteringFunctions</state>
- <state>$PROJ_DIR$\..\..\..\..\..\Middlewares\ST\STM32_USB_Device_Library\Class\AUDIO\Inc</state>
- <state>$PROJ_DIR$\..\..\..\..\..\Drivers\CMSIS\DSP\Include</state>
- <state>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\Components\stts22h</state>
- </option>
- <option>
- <name>CCStdIncCheck</name>
- <state>0</state>
- </option>
- <option>
- <name>CCCodeSection</name>
- <state>.text</state>
- </option>
- <option>
- <name>IProcessorMode2</name>
- <state>1</state>
- </option>
- <option>
- <name>CCOptLevel</name>
- <state>3</state>
- </option>
- <option>
- <name>CCOptStrategy</name>
- <version>0</version>
- <state>1</state>
- </option>
- <option>
- <name>CCOptLevelSlave</name>
- <state>3</state>
- </option>
- <option>
- <name>CompilerMisraRules98</name>
- <version>0</version>
- <state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
- </option>
- <option>
- <name>CompilerMisraRules04</name>
- <version>0</version>
- <state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
- </option>
- <option>
- <name>CCPosIndRopi</name>
- <state>0</state>
- </option>
- <option>
- <name>CCPosIndRwpi</name>
- <state>0</state>
- </option>
- <option>
- <name>CCPosIndNoDynInit</name>
- <state>0</state>
- </option>
- <option>
- <name>IccLang</name>
- <state>0</state>
- </option>
- <option>
- <name>IccCDialect</name>
- <state>1</state>
- </option>
- <option>
- <name>IccAllowVLA</name>
- <state>0</state>
- </option>
- <option>
- <name>IccStaticDestr</name>
- <state>0</state>
- </option>
- <option>
- <name>IccCppInlineSemantics</name>
- <state>0</state>
- </option>
- <option>
- <name>IccCmsis</name>
- <state>1</state>
- </option>
- <option>
- <name>IccFloatSemantics</name>
- <state>0</state>
- </option>
- <option>
- <name>CCNoLiteralPool</name>
- <state>0</state>
- </option>
- <option>
- <name>CCOptStrategySlave</name>
- <version>0</version>
- <state>1</state>
- </option>
- <option>
- <name>CCGuardCalls</name>
- <state>1</state>
- </option>
- <option>
- <name>CCEncSource</name>
- <state>0</state>
- </option>
- <option>
- <name>CCEncOutput</name>
- <state>0</state>
- </option>
- <option>
- <name>CCEncOutputBom</name>
- <state>1</state>
- </option>
- <option>
- <name>CCEncInput</name>
- <state>0</state>
- </option>
- <option>
- <name>IccExceptions2</name>
- <state>0</state>
- </option>
- <option>
- <name>IccRTTI2</name>
- <state>0</state>
- </option>
- </data>
- </settings>
- <settings>
- <name>AARM</name>
- <archiveVersion>2</archiveVersion>
- <data>
- <version>10</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>AObjPrefix</name>
- <state>1</state>
- </option>
- <option>
- <name>AEndian</name>
- <state>1</state>
- </option>
- <option>
- <name>ACaseSensitivity</name>
- <state>1</state>
- </option>
- <option>
- <name>MacroChars</name>
- <version>0</version>
- <state>0</state>
- </option>
- <option>
- <name>AWarnEnable</name>
- <state>0</state>
- </option>
- <option>
- <name>AWarnWhat</name>
- <state>0</state>
- </option>
- <option>
- <name>AWarnOne</name>
- <state></state>
- </option>
- <option>
- <name>AWarnRange1</name>
- <state></state>
- </option>
- <option>
- <name>AWarnRange2</name>
- <state></state>
- </option>
- <option>
- <name>ADebug</name>
- <state>1</state>
- </option>
- <option>
- <name>AltRegisterNames</name>
- <state>0</state>
- </option>
- <option>
- <name>ADefines</name>
- <state></state>
- </option>
- <option>
- <name>AList</name>
- <state>0</state>
- </option>
- <option>
- <name>AListHeader</name>
- <state>1</state>
- </option>
- <option>
- <name>AListing</name>
- <state>1</state>
- </option>
- <option>
- <name>Includes</name>
- <state>0</state>
- </option>
- <option>
- <name>MacDefs</name>
- <state>0</state>
- </option>
- <option>
- <name>MacExps</name>
- <state>1</state>
- </option>
- <option>
- <name>MacExec</name>
- <state>0</state>
- </option>
- <option>
- <name>OnlyAssed</name>
- <state>0</state>
- </option>
- <option>
- <name>MultiLine</name>
- <state>0</state>
- </option>
- <option>
- <name>PageLengthCheck</name>
- <state>0</state>
- </option>
- <option>
- <name>PageLength</name>
- <state>80</state>
- </option>
- <option>
- <name>TabSpacing</name>
- <state>8</state>
- </option>
- <option>
- <name>AXRef</name>
- <state>0</state>
- </option>
- <option>
- <name>AXRefDefines</name>
- <state>0</state>
- </option>
- <option>
- <name>AXRefInternal</name>
- <state>0</state>
- </option>
- <option>
- <name>AXRefDual</name>
- <state>0</state>
- </option>
- <option>
- <name>AProcessor</name>
- <state>1</state>
- </option>
- <option>
- <name>AFpuProcessor</name>
- <state>1</state>
- </option>
- <option>
- <name>AOutputFile</name>
- <state>$FILE_BNAME$.o</state>
- </option>
- <option>
- <name>ALimitErrorsCheck</name>
- <state>0</state>
- </option>
- <option>
- <name>ALimitErrorsEdit</name>
- <state>100</state>
- </option>
- <option>
- <name>AIgnoreStdInclude</name>
- <state>0</state>
- </option>
- <option>
- <name>AUserIncludes</name>
- <state></state>
- </option>
- <option>
- <name>AExtraOptionsCheckV2</name>
- <state>0</state>
- </option>
- <option>
- <name>AExtraOptionsV2</name>
- <state></state>
- </option>
- <option>
- <name>AsmNoLiteralPool</name>
- <state>0</state>
- </option>
- </data>
- </settings>
- <settings>
- <name>OBJCOPY</name>
- <archiveVersion>0</archiveVersion>
- <data>
- <version>1</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>OOCOutputFormat</name>
- <version>3</version>
- <state>1</state>
- </option>
- <option>
- <name>OCOutputOverride</name>
- <state>1</state>
- </option>
- <option>
- <name>OOCOutputFile</name>
- <state>BSP.hex</state>
- </option>
- <option>
- <name>OOCCommandLineProducer</name>
- <state>1</state>
- </option>
- <option>
- <name>OOCObjCopyEnable</name>
- <state>1</state>
- </option>
- </data>
- </settings>
- <settings>
- <name>CUSTOM</name>
- <archiveVersion>3</archiveVersion>
- <data>
- <extensions></extensions>
- <cmdline></cmdline>
- <hasPrio>0</hasPrio>
- </data>
- </settings>
- <settings>
- <name>BICOMP</name>
- <archiveVersion>0</archiveVersion>
- <data />
- </settings>
- <settings>
- <name>BUILDACTION</name>
- <archiveVersion>1</archiveVersion>
- <data>
- <prebuild></prebuild>
- <postbuild></postbuild>
- </data>
- </settings>
- <settings>
- <name>ILINK</name>
- <archiveVersion>0</archiveVersion>
- <data>
- <version>20</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>IlinkLibIOConfig</name>
- <state>1</state>
- </option>
- <option>
- <name>XLinkMisraHandler</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkInputFileSlave</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkOutputFile</name>
- <state>RCC_ClockConfig.out</state>
- </option>
- <option>
- <name>IlinkDebugInfoEnable</name>
- <state>1</state>
- </option>
- <option>
- <name>IlinkKeepSymbols</name>
- <state></state>
- </option>
- <option>
- <name>IlinkRawBinaryFile</name>
- <state></state>
- </option>
- <option>
- <name>IlinkRawBinarySymbol</name>
- <state></state>
- </option>
- <option>
- <name>IlinkRawBinarySegment</name>
- <state></state>
- </option>
- <option>
- <name>IlinkRawBinaryAlign</name>
- <state></state>
- </option>
- <option>
- <name>IlinkDefines</name>
- <state></state>
- </option>
- <option>
- <name>IlinkConfigDefines</name>
- <state></state>
- </option>
- <option>
- <name>IlinkMapFile</name>
- <state>1</state>
- </option>
- <option>
- <name>IlinkLogFile</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkLogInitialization</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkLogModule</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkLogSection</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkLogVeneer</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkIcfOverride</name>
- <state>1</state>
- </option>
- <option>
- <name>IlinkIcfFile</name>
- <state>$PROJ_DIR$/stm32wb5mxx_flash_cm4.icf</state>
- </option>
- <option>
- <name>IlinkIcfFileSlave</name>
- <state></state>
- </option>
- <option>
- <name>IlinkEnableRemarks</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkSuppressDiags</name>
- <state></state>
- </option>
- <option>
- <name>IlinkTreatAsRem</name>
- <state></state>
- </option>
- <option>
- <name>IlinkTreatAsWarn</name>
- <state></state>
- </option>
- <option>
- <name>IlinkTreatAsErr</name>
- <state></state>
- </option>
- <option>
- <name>IlinkWarningsAreErrors</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkUseExtraOptions</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkExtraOptions</name>
- <state></state>
- </option>
- <option>
- <name>IlinkLowLevelInterfaceSlave</name>
- <state>1</state>
- </option>
- <option>
- <name>IlinkAutoLibEnable</name>
- <state>1</state>
- </option>
- <option>
- <name>IlinkAdditionalLibs</name>
- <state></state>
- </option>
- <option>
- <name>IlinkOverrideProgramEntryLabel</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkProgramEntryLabelSelect</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkProgramEntryLabel</name>
- <state>__iar_program_start</state>
- </option>
- <option>
- <name>DoFill</name>
- <state>0</state>
- </option>
- <option>
- <name>FillerByte</name>
- <state>0xFF</state>
- </option>
- <option>
- <name>FillerStart</name>
- <state>0x0</state>
- </option>
- <option>
- <name>FillerEnd</name>
- <state>0x0</state>
- </option>
- <option>
- <name>CrcSize</name>
- <version>0</version>
- <state>1</state>
- </option>
- <option>
- <name>CrcAlign</name>
- <state>1</state>
- </option>
- <option>
- <name>CrcPoly</name>
- <state>0x11021</state>
- </option>
- <option>
- <name>CrcCompl</name>
- <version>0</version>
- <state>0</state>
- </option>
- <option>
- <name>CrcBitOrder</name>
- <version>0</version>
- <state>0</state>
- </option>
- <option>
- <name>CrcInitialValue</name>
- <state>0x0</state>
- </option>
- <option>
- <name>DoCrc</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkBE8Slave</name>
- <state>1</state>
- </option>
- <option>
- <name>IlinkBufferedTerminalOutput</name>
- <state>1</state>
- </option>
- <option>
- <name>IlinkStdoutInterfaceSlave</name>
- <state>1</state>
- </option>
- <option>
- <name>CrcFullSize</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkIElfToolPostProcess</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkLogAutoLibSelect</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkLogRedirSymbols</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkLogUnusedFragments</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkCrcReverseByteOrder</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkCrcUseAsInput</name>
- <state>1</state>
- </option>
- <option>
- <name>IlinkOptInline</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkOptExceptionsAllow</name>
- <state>1</state>
- </option>
- <option>
- <name>IlinkOptExceptionsForce</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkCmsis</name>
- <state>1</state>
- </option>
- <option>
- <name>IlinkOptMergeDuplSections</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkOptUseVfe</name>
- <state>1</state>
- </option>
- <option>
- <name>IlinkOptForceVfe</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkStackAnalysisEnable</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkStackControlFile</name>
- <state></state>
- </option>
- <option>
- <name>IlinkStackCallGraphFile</name>
- <state></state>
- </option>
- <option>
- <name>CrcAlgorithm</name>
- <version>1</version>
- <state>1</state>
- </option>
- <option>
- <name>CrcUnitSize</name>
- <version>0</version>
- <state>0</state>
- </option>
- <option>
- <name>IlinkThreadsSlave</name>
- <state>1</state>
- </option>
- <option>
- <name>IlinkLogCallGraph</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkIcfFile_AltDefault</name>
- <state></state>
- </option>
- <option>
- <name>IlinkEncInput</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkEncOutput</name>
- <state>0</state>
- </option>
- <option>
- <name>IlinkEncOutputBom</name>
- <state>1</state>
- </option>
- <option>
- <name>IlinkHeapSelect</name>
- <state>1</state>
- </option>
- <option>
- <name>IlinkLocaleSelect</name>
- <state>1</state>
- </option>
- </data>
- </settings>
- <settings>
- <name>IARCHIVE</name>
- <archiveVersion>0</archiveVersion>
- <data>
- <version>0</version>
- <wantNonLocal>1</wantNonLocal>
- <debug>1</debug>
- <option>
- <name>IarchiveInputs</name>
- <state></state>
- </option>
- <option>
- <name>IarchiveOverride</name>
- <state>0</state>
- </option>
- <option>
- <name>IarchiveOutput</name>
- <state>###Unitialized###</state>
- </option>
- </data>
- </settings>
- <settings>
- <name>BILINK</name>
- <archiveVersion>0</archiveVersion>
- <data />
- </settings>
- <settings>
- <name>Coder</name>
- <archiveVersion>0</archiveVersion>
- <data />
- </settings>
- </configuration>
- <group>
- <name>Doc</name>
- <file>
- <name>$PROJ_DIR$\..\readme.txt</name>
- </file>
- </group>
- <group>
- <name>Drivers</name>
- <group>
- <name>BSP</name>
- <group>
- <name>Components</name>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\Components\ism330dhcx\ism330dhcx.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\Components\ism330dhcx\ism330dhcx_reg.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\Components\s25fl128s\s25fl128s.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\Components\ssd1315\ssd1315.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\Components\ssd1315\ssd1315_reg.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\Components\stts22h\stts22h.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\Components\stts22h\stts22h_reg.c</name>
- </file>
- </group>
- <group>
- <name>STM32WB5MM-DK</name>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\STM32WB5MM-DK\stm32wb5mm_dk.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\STM32WB5MM-DK\stm32wb5mm_dk_audio.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\STM32WB5MM-DK\stm32wb5mm_dk_bus.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\STM32WB5MM-DK\stm32wb5mm_dk_env_sensors.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\STM32WB5MM-DK\stm32wb5mm_dk_env_sensors_ex.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\STM32WB5MM-DK\stm32wb5mm_dk_lcd.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\STM32WB5MM-DK\stm32wb5mm_dk_motion_sensors.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\STM32WB5MM-DK\stm32wb5mm_dk_motion_sensors_ex.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\BSP\STM32WB5MM-DK\stm32wb5mm_dk_qspi.c</name>
- </file>
- </group>
- </group>
- <group>
- <name>CMSIS</name>
- <group>
- <name>DSP</name>
- <group>
- <name>Source</name>
- <group>
- <name>FilteringFunctions</name>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\CMSIS\DSP\Source\FilteringFunctions\arm_fir_decimate_init_q15.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\CMSIS\DSP\Source\FilteringFunctions\arm_fir_decimate_q15.c</name>
- </file>
- </group>
- </group>
- </group>
- <file>
- <name>$PROJ_DIR$\..\Src\system_stm32wbxx.c</name>
- </file>
- </group>
- <group>
- <name>STM32WBxx_HAL_Driver</name>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_cortex.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_dma.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_exti.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_flash.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_flash_ex.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_gpio.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_i2c.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_i2c_ex.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_pcd.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_pcd_ex.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_pwr.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_pwr_ex.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_qspi.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_rcc.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_rcc_ex.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_sai.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_sai_ex.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_spi.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_tim.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_tim_ex.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_uart.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_hal_uart_ex.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Drivers\STM32WBxx_HAL_Driver\Src\stm32wbxx_ll_usb.c</name>
- </file>
- </group>
- </group>
- <group>
- <name>Example</name>
- <group>
- <name>EWARM</name>
- <file>
- <name>$PROJ_DIR$\startup_stm32wb5mxx_cm4.s</name>
- </file>
- </group>
- <group>
- <name>User</name>
- <group>
- <name>usb</name>
- <file>
- <name>$PROJ_DIR$\..\Src\usb\usbd_audio_if.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\Src\usb\usbd_audio_in.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\Src\usb\usbd_conf.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\Src\usb\usbd_desc.c</name>
- </file>
- </group>
- <group>
- <name>vl53l0x</name>
- <file>
- <name>$PROJ_DIR$\..\Src\vl53l0x\vl53l0x_api.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\Src\vl53l0x\vl53l0x_api_calibration.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\Src\vl53l0x\vl53l0x_api_core.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\Src\vl53l0x\vl53l0x_api_ranging.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\Src\vl53l0x\vl53l0x_api_strings.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\Src\vl53l0x\vl53l0x_platform_log.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\Src\vl53l0x\vl53l0x_tof.c</name>
- </file>
- </group>
- <file>
- <name>$PROJ_DIR$\..\Src\lcd.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\Src\led.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\Src\main.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\Src\proximity.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\Src\qspi.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\Src\record.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\Src\sensors.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\Src\stm32wbxx_it.c</name>
- </file>
- </group>
- </group>
- <group>
- <name>Middlewares</name>
- <group>
- <name>ST</name>
- <group>
- <name>STM32_Audio</name>
- <group>
- <name>PDM</name>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Middlewares\ST\STM32_Audio\Addons\PDM\Lib\libPDMFilter_CM4_IAR_wc32.a</name>
- </file>
- </group>
- </group>
- <group>
- <name>STM32_USB_Device_Library</name>
- <group>
- <name>Class</name>
- <group>
- <name>AUDIO</name>
- </group>
- </group>
- <group>
- <name>Core</name>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_core.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_ctlreq.c</name>
- </file>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Middlewares\ST\STM32_USB_Device_Library\Core\Src\usbd_ioreq.c</name>
- </file>
- </group>
- </group>
- </group>
- </group>
- <group>
- <name>Utilities</name>
- <file>
- <name>$PROJ_DIR$\..\..\..\..\..\Utilities\LCD\stm32_lcd.c</name>
- </file>
- </group>
-</project>
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/EWARM/Project.eww b/Projects/STM32WB5MM-DK/Examples/BSP/EWARM/Project.eww
deleted file mode 100644
index e0fd14b2a..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/EWARM/Project.eww
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-
-<workspace>
- <project>
- <path>$WS_DIR$\Project.ewp</path>
- </project>
- <batchBuild/>
-</workspace>
-
-
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/EWARM/startup_stm32wb5mxx_cm4.s b/Projects/STM32WB5MM-DK/Examples/BSP/EWARM/startup_stm32wb5mxx_cm4.s
deleted file mode 100644
index 690ee250e..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/EWARM/startup_stm32wb5mxx_cm4.s
+++ /dev/null
@@ -1,515 +0,0 @@
-;******************************************************************************
-;* File Name : startup_stm32wb5mxx_cm4.s
-;* Author : MCD Application Team
-;* Description : M4 core vector table of the STM32WB5Mxx devices for the
-;* IAR (EWARM) toolchain.
-;*
-;* This module performs:
-;* - Set the initial SP
-;* - Set the initial PC == _iar_program_start,
-;* - Set the vector table entries with the exceptions ISR
-;* address.
-;* - Branches to main in the C library (which eventually
-;* calls main()).
-;* After Reset the Cortex-M4 processor is in Thread mode,
-;* priority is Privileged, and the Stack is set to Main.
-;******************************************************************************
-;* @attention
-;*
-;* Copyright (c) 2019 STMicroelectronics.
-;* All rights reserved.
-;*
-;* This software is licensed under terms that can be found in the LICENSE file
-;* in the root directory of this software component.
-;* If no LICENSE file comes with this software, it is provided AS-IS.
-;*
-;******************************************************************************
-;
-;
-; The modules in this file are included in the libraries, and may be replaced
-; by any user-defined modules that define the PUBLIC symbol _program_start or
-; a user defined start symbol.
-; To override the cstartup defined in the library, simply add your modified
-; version to the workbench project.
-;
-; The vector table is normally located at address 0.
-; When debugging in RAM, it can be located in RAM, aligned to at least 2^6.
-; The name "__vector_table" has special meaning for C-SPY:
-; it is where the SP start value is found, and the NVIC vector
-; table register (VTOR) is initialized to this address if != 0.
-;
-; Cortex-M version
-;
-
- MODULE ?cstartup
-
- ;; Forward declaration of sections.
- SECTION CSTACK:DATA:NOROOT(3)
-
- SECTION .intvec:CODE:NOROOT(2)
-
- EXTERN __iar_program_start
- EXTERN SystemInit
- PUBLIC __vector_table
-
- DATA
-__vector_table
- DCD sfe(CSTACK)
- DCD Reset_Handler ; Reset Handler
-
- DCD NMI_Handler ; NMI Handler
- DCD HardFault_Handler ; Hard Fault Handler
- DCD MemManage_Handler ; MPU Fault Handler
- DCD BusFault_Handler ; Bus Fault Handler
- DCD UsageFault_Handler ; Usage Fault Handler
- DCD 0 ; Reserved
- DCD 0 ; Reserved
- DCD 0 ; Reserved
- DCD 0 ; Reserved
- DCD SVC_Handler ; SVCall Handler
- DCD DebugMon_Handler ; Debug Monitor Handler
- DCD 0 ; Reserved
- DCD PendSV_Handler ; PendSV Handler
- DCD SysTick_Handler ; SysTick Handler
-
- ; External Interrupts
- DCD WWDG_IRQHandler ; Window WatchDog
- DCD PVD_PVM_IRQHandler ; PVD and PVM Interrupt
- DCD TAMP_STAMP_LSECSS_IRQHandler ; RTC Tamper, TimeStamp Interrupts and LSECSS Interrupts
- DCD RTC_WKUP_IRQHandler ; RTC Wakeup Interrupt
- DCD FLASH_IRQHandler ; FLASH global Interrupt
- DCD RCC_IRQHandler ; RCC Interrupt
- DCD EXTI0_IRQHandler ; EXTI Line 0 Interrupt
- DCD EXTI1_IRQHandler ; EXTI Line 1 Interrupt
- DCD EXTI2_IRQHandler ; EXTI Line 2 Interrupt
- DCD EXTI3_IRQHandler ; EXTI Line 3 Interrupt
- DCD EXTI4_IRQHandler ; EXTI Line 4 Interrupt
- DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1 Interrupt
- DCD DMA1_Channel2_IRQHandler ; DMA1 Channel 2 Interrupt
- DCD DMA1_Channel3_IRQHandler ; DMA1 Channel 3 Interrupt
- DCD DMA1_Channel4_IRQHandler ; DMA1 Channel 4 Interrupt
- DCD DMA1_Channel5_IRQHandler ; DMA1 Channel 5 Interrupt
- DCD DMA1_Channel6_IRQHandler ; DMA1 Channel 6 Interrupt
- DCD DMA1_Channel7_IRQHandler ; DMA1 Channel 7 Interrupt
- DCD ADC1_IRQHandler ; ADC1 Interrupt
- DCD USB_HP_IRQHandler ; USB High Priority Interrupt
- DCD USB_LP_IRQHandler ; USB Low Priority Interrupt
- DCD C2SEV_PWR_C2H_IRQHandler ; CPU M0+ SEV Interrupt
- DCD COMP_IRQHandler ; COMP1 and COMP2 Interrupts
- DCD EXTI9_5_IRQHandler ; EXTI Lines [9:5] Interrupt
- DCD TIM1_BRK_IRQHandler ; TIM1 Break Interrupt
- DCD TIM1_UP_TIM16_IRQHandler ; TIM1 Update and TIM16 global Interrupts
- DCD TIM1_TRG_COM_TIM17_IRQHandler ; TIM1 Trigger and Communication and TIM17 global Interrupts
- DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare Interrupt
- DCD TIM2_IRQHandler ; TIM2 Global Interrupt
- DCD PKA_IRQHandler ; PKA Interrupt
- DCD I2C1_EV_IRQHandler ; I2C1 Event Interrupt
- DCD I2C1_ER_IRQHandler ; I2C1 Error Interrupt
- DCD I2C3_EV_IRQHandler ; I2C3 Event Interrupt
- DCD I2C3_ER_IRQHandler ; I2C3 Error Interrupt
- DCD SPI1_IRQHandler ; SPI1 Interrupt
- DCD SPI2_IRQHandler ; SPI2 Interrupt
- DCD USART1_IRQHandler ; USART1 Interrupt
- DCD LPUART1_IRQHandler ; LPUART1 Interrupt
- DCD SAI1_IRQHandler ; SAI Interrupt
- DCD TSC_IRQHandler ; TSC Interrupt
- DCD EXTI15_10_IRQHandler ; EXTI Lines1[15:10 ]Interrupts
- DCD RTC_Alarm_IRQHandler ; RTC Alarms (A and B) Interrupt
- DCD CRS_IRQHandler ; CRS interrupt
- DCD PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler ; WKUP Interrupt from PWR
- DCD IPCC_C1_RX_IRQHandler ; IPCC CPU1 RX occupied interrupt
- DCD IPCC_C1_TX_IRQHandler ; IPCC CPU1 RX free interrupt
- DCD HSEM_IRQHandler ; HSEM0 Interrupt
- DCD LPTIM1_IRQHandler ; LPTIM1 Interrupt
- DCD LPTIM2_IRQHandler ; LPTIM2 Interrupt
- DCD LCD_IRQHandler ; LCD Interrupt
- DCD QUADSPI_IRQHandler ; QUADSPI Interrupt
- DCD AES1_IRQHandler ; AES1 Interrupt
- DCD AES2_IRQHandler ; AES2 Interrupt
- DCD RNG_IRQHandler ; RNG1 Interrupt
- DCD FPU_IRQHandler ; FPU Interrupt
- DCD DMA2_Channel1_IRQHandler ; DMA2 Channel 1 Interrupt
- DCD DMA2_Channel2_IRQHandler ; DMA2 Channel 2 Interrupt
- DCD DMA2_Channel3_IRQHandler ; DMA2 Channel 3 Interrupt
- DCD DMA2_Channel4_IRQHandler ; DMA2 Channel 4 Interrupt
- DCD DMA2_Channel5_IRQHandler ; DMA2 Channel 5 Interrupt
- DCD DMA2_Channel6_IRQHandler ; DMA2 Channel 6 Interrupt
- DCD DMA2_Channel7_IRQHandler ; DMA2 Channel 7 Interrupt
- DCD DMAMUX1_OVR_IRQHandler ; DMAMUX overrun Interrupt
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; Default interrupt handlers.
-;;
- THUMB
-
- PUBWEAK Reset_Handler
- SECTION .text:CODE:NOROOT:REORDER(2)
-Reset_Handler
- LDR R0, =SystemInit
- BLX R0
- LDR R0, =__iar_program_start
- BX R0
-
- PUBWEAK NMI_Handler
- SECTION .text:CODE:NOROOT:REORDER(1)
-NMI_Handler
- B NMI_Handler
-
- PUBWEAK HardFault_Handler
- SECTION .text:CODE:NOROOT:REORDER(1)
-HardFault_Handler
- B HardFault_Handler
-
- PUBWEAK MemManage_Handler
- SECTION .text:CODE:NOROOT:REORDER(1)
-MemManage_Handler
- B MemManage_Handler
-
- PUBWEAK BusFault_Handler
- SECTION .text:CODE:NOROOT:REORDER(1)
-BusFault_Handler
- B BusFault_Handler
-
- PUBWEAK UsageFault_Handler
- SECTION .text:CODE:NOROOT:REORDER(1)
-UsageFault_Handler
- B UsageFault_Handler
-
- PUBWEAK SVC_Handler
- SECTION .text:CODE:NOROOT:REORDER(1)
-SVC_Handler
- B SVC_Handler
-
- PUBWEAK DebugMon_Handler
- SECTION .text:CODE:NOROOT:REORDER(1)
-DebugMon_Handler
- B DebugMon_Handler
-
- PUBWEAK PendSV_Handler
- SECTION .text:CODE:NOROOT:REORDER(1)
-PendSV_Handler
- B PendSV_Handler
-
- PUBWEAK SysTick_Handler
- SECTION .text:CODE:NOROOT:REORDER(1)
-SysTick_Handler
- B SysTick_Handler
-
- PUBWEAK WWDG_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-WWDG_IRQHandler
- B WWDG_IRQHandler
-
- PUBWEAK PVD_PVM_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-PVD_PVM_IRQHandler
- B PVD_PVM_IRQHandler
-
- PUBWEAK TAMP_STAMP_LSECSS_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-TAMP_STAMP_LSECSS_IRQHandler
- B TAMP_STAMP_LSECSS_IRQHandler
-
- PUBWEAK RTC_WKUP_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-RTC_WKUP_IRQHandler
- B RTC_WKUP_IRQHandler
-
- PUBWEAK FLASH_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-FLASH_IRQHandler
- B FLASH_IRQHandler
-
- PUBWEAK RCC_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-RCC_IRQHandler
- B RCC_IRQHandler
-
- PUBWEAK EXTI0_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-EXTI0_IRQHandler
- B EXTI0_IRQHandler
-
- PUBWEAK EXTI1_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-EXTI1_IRQHandler
- B EXTI1_IRQHandler
-
- PUBWEAK EXTI2_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-EXTI2_IRQHandler
- B EXTI2_IRQHandler
-
- PUBWEAK EXTI3_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-EXTI3_IRQHandler
- B EXTI3_IRQHandler
-
- PUBWEAK EXTI4_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-EXTI4_IRQHandler
- B EXTI4_IRQHandler
-
- PUBWEAK DMA1_Channel1_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-DMA1_Channel1_IRQHandler
- B DMA1_Channel1_IRQHandler
-
- PUBWEAK DMA1_Channel2_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-DMA1_Channel2_IRQHandler
- B DMA1_Channel2_IRQHandler
-
- PUBWEAK DMA1_Channel3_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-DMA1_Channel3_IRQHandler
- B DMA1_Channel3_IRQHandler
-
- PUBWEAK DMA1_Channel4_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-DMA1_Channel4_IRQHandler
- B DMA1_Channel4_IRQHandler
-
- PUBWEAK DMA1_Channel5_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-DMA1_Channel5_IRQHandler
- B DMA1_Channel5_IRQHandler
-
- PUBWEAK DMA1_Channel6_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-DMA1_Channel6_IRQHandler
- B DMA1_Channel6_IRQHandler
-
- PUBWEAK DMA1_Channel7_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-DMA1_Channel7_IRQHandler
- B DMA1_Channel7_IRQHandler
-
- PUBWEAK ADC1_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-ADC1_IRQHandler
- B ADC1_IRQHandler
-
- PUBWEAK USB_HP_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-USB_HP_IRQHandler
- B USB_HP_IRQHandler
-
- PUBWEAK USB_LP_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-USB_LP_IRQHandler
- B USB_LP_IRQHandler
-
- PUBWEAK C2SEV_PWR_C2H_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-C2SEV_PWR_C2H_IRQHandler
- B C2SEV_PWR_C2H_IRQHandler
-
- PUBWEAK COMP_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-COMP_IRQHandler
- B COMP_IRQHandler
-
- PUBWEAK EXTI9_5_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-EXTI9_5_IRQHandler
- B EXTI9_5_IRQHandler
-
- PUBWEAK TIM1_BRK_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-TIM1_BRK_IRQHandler
- B TIM1_BRK_IRQHandler
-
- PUBWEAK TIM1_UP_TIM16_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-TIM1_UP_TIM16_IRQHandler
- B TIM1_UP_TIM16_IRQHandler
-
- PUBWEAK TIM1_TRG_COM_TIM17_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-TIM1_TRG_COM_TIM17_IRQHandler
- B TIM1_TRG_COM_TIM17_IRQHandler
-
- PUBWEAK TIM1_CC_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-TIM1_CC_IRQHandler
- B TIM1_CC_IRQHandler
-
- PUBWEAK TIM2_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-TIM2_IRQHandler
- B TIM2_IRQHandler
-
- PUBWEAK PKA_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-PKA_IRQHandler
- B PKA_IRQHandler
-
- PUBWEAK I2C1_EV_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-I2C1_EV_IRQHandler
- B I2C1_EV_IRQHandler
-
- PUBWEAK I2C1_ER_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-I2C1_ER_IRQHandler
- B I2C1_ER_IRQHandler
-
- PUBWEAK I2C3_EV_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-I2C3_EV_IRQHandler
- B I2C3_EV_IRQHandler
-
- PUBWEAK I2C3_ER_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-I2C3_ER_IRQHandler
- B I2C3_ER_IRQHandler
-
- PUBWEAK SPI1_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-SPI1_IRQHandler
- B SPI1_IRQHandler
-
- PUBWEAK SPI2_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-SPI2_IRQHandler
- B SPI2_IRQHandler
-
- PUBWEAK USART1_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-USART1_IRQHandler
- B USART1_IRQHandler
-
- PUBWEAK LPUART1_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-LPUART1_IRQHandler
- B LPUART1_IRQHandler
-
- PUBWEAK SAI1_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-SAI1_IRQHandler
- B SAI1_IRQHandler
-
- PUBWEAK TSC_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-TSC_IRQHandler
- B TSC_IRQHandler
-
- PUBWEAK EXTI15_10_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-EXTI15_10_IRQHandler
- B EXTI15_10_IRQHandler
-
- PUBWEAK RTC_Alarm_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-RTC_Alarm_IRQHandler
- B RTC_Alarm_IRQHandler
-
- PUBWEAK CRS_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-CRS_IRQHandler
- B CRS_IRQHandler
-
- PUBWEAK PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler
- B PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler
-
- PUBWEAK IPCC_C1_RX_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-IPCC_C1_RX_IRQHandler
- B IPCC_C1_RX_IRQHandler
-
- PUBWEAK IPCC_C1_TX_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-IPCC_C1_TX_IRQHandler
- B IPCC_C1_TX_IRQHandler
-
- PUBWEAK HSEM_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-HSEM_IRQHandler
- B HSEM_IRQHandler
-
- PUBWEAK LPTIM1_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-LPTIM1_IRQHandler
- B LPTIM1_IRQHandler
-
- PUBWEAK LPTIM2_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-LPTIM2_IRQHandler
- B LPTIM2_IRQHandler
-
- PUBWEAK LCD_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-LCD_IRQHandler
- B LCD_IRQHandler
-
- PUBWEAK QUADSPI_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-QUADSPI_IRQHandler
- B QUADSPI_IRQHandler
-
- PUBWEAK AES1_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-AES1_IRQHandler
- B AES1_IRQHandler
-
- PUBWEAK AES2_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-AES2_IRQHandler
- B AES2_IRQHandler
-
- PUBWEAK RNG_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-RNG_IRQHandler
- B RNG_IRQHandler
-
- PUBWEAK FPU_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-FPU_IRQHandler
- B FPU_IRQHandler
-
- PUBWEAK DMA2_Channel1_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-DMA2_Channel1_IRQHandler
- B DMA2_Channel1_IRQHandler
-
- PUBWEAK DMA2_Channel2_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-DMA2_Channel2_IRQHandler
- B DMA2_Channel2_IRQHandler
-
- PUBWEAK DMA2_Channel3_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-DMA2_Channel3_IRQHandler
- B DMA2_Channel3_IRQHandler
-
- PUBWEAK DMA2_Channel4_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-DMA2_Channel4_IRQHandler
- B DMA2_Channel4_IRQHandler
-
- PUBWEAK DMA2_Channel5_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-DMA2_Channel5_IRQHandler
- B DMA2_Channel5_IRQHandler
-
- PUBWEAK DMA2_Channel6_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-DMA2_Channel6_IRQHandler
- B DMA2_Channel6_IRQHandler
-
- PUBWEAK DMA2_Channel7_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-DMA2_Channel7_IRQHandler
- B DMA2_Channel7_IRQHandler
-
- PUBWEAK DMAMUX1_OVR_IRQHandler
- SECTION .text:CODE:NOROOT:REORDER(1)
-DMAMUX1_OVR_IRQHandler
- B DMAMUX1_OVR_IRQHandler
-
- END
-
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/EWARM/stm32wb5mxx_flash_cm4.icf b/Projects/STM32WB5MM-DK/Examples/BSP/EWARM/stm32wb5mxx_flash_cm4.icf
deleted file mode 100644
index cfa53dfe3..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/EWARM/stm32wb5mxx_flash_cm4.icf
+++ /dev/null
@@ -1,40 +0,0 @@
-/*###ICF### Section handled by ICF editor, don't touch! ****/
-/*-Editor annotation file-*/
-/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
-/*-Specials-*/
-define symbol __ICFEDIT_intvec_start__ = 0x08000000;
-/*-Memory Regions-*/
-/***** FLASH Part dedicated to M4 *****/
-define symbol __ICFEDIT_region_ROM_start__ = 0x08000000;
-define symbol __ICFEDIT_region_ROM_end__ = 0x0807FFFF;
-define symbol __ICFEDIT_region_RAM_start__ = 0x20000008;
-define symbol __ICFEDIT_region_RAM_end__ = 0x2002FFFF;
-/*-Sizes-*/
-define symbol __ICFEDIT_size_cstack__ = 0x1000;
-define symbol __ICFEDIT_size_heap__ = 0x1500;
-/**** End of ICF editor section. ###ICF###*/
-
-define symbol __ICFEDIT_region_RAM_SHARED_start__ = 0x20030000;
-define symbol __ICFEDIT_region_RAM_SHARED_end__ = 0x200327FF;
-
-define memory mem with size = 4G;
-define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
-define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
-define region RAM_SHARED_region = mem:[from __ICFEDIT_region_RAM_SHARED_start__ to __ICFEDIT_region_RAM_SHARED_end__];
-
-define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
-define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
-
-/* MB_MEM1 and MB_MEM2 are sections reserved to mailbox communication. It is placed in the shared memory */
-initialize by copy { readwrite };
-do not initialize { section .noinit,
- section MAPPING_TABLE,
- section MB_MEM1 };
-
-place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
-
-place in ROM_region { readonly };
-place in RAM_region { readwrite,block CSTACK, block HEAP };
-place in RAM_SHARED_region { first section MAPPING_TABLE};
-place in RAM_SHARED_region { section MB_MEM1};
-place in RAM_SHARED_region { section MB_MEM2}; \ No newline at end of file
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Inc/main.h b/Projects/STM32WB5MM-DK/Examples/BSP/Inc/main.h
deleted file mode 100644
index 7eaba095b..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Inc/main.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- ******************************************************************************
- * @file BSP/Inc/main.h
- * @author MCD Application Team
- * @brief Header for main.c module
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2017(-2021) STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef MAIN_H
-#define MAIN_H
-
-/* Defines -------------------------------------------------------------------*/
-/* #define USE_LPS22HB_TEMP */
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32wbxx_hal.h"
-#include "stm32wb5mm_dk.h"
-#include "stm32wb5mm_dk_env_sensors.h"
-#include "stm32wb5mm_dk_motion_sensors.h"
-#include "stm32wb5mm_dk_errno.h"
-#include "stm32wb5mm_dk_conf.h"
-#include "stm32wb5mm_dk_bus.h"
-#include "stm32wb5mm_dk_lcd.h"
-#include "stm32wb5mm_dk_qspi.h"
-#include "stm32_lcd.h"
-#include "stm32wb5mm_dk_audio.h"
-#include "stm32wbxx.h"
-#include "stm32wbxx_it.h"
-#include "usbd_core.h"
-#include "usbd_desc.h"
-#include "usbd_audio_in.h"
-#include "usbd_audio_if.h"
-
-#include <stdio.h>
-
-/* Exported types ------------------------------------------------------------*/
-typedef struct
-{
- void (*DemoFunc)(void);
- uint8_t DemoName[50];
- uint32_t DemoIndex;
-}BSP_DemoTypedef;
-/* Exported variables --------------------------------------------------------*/
-extern __IO uint32_t ButtonState;
-
-/* Exported constants --------------------------------------------------------*/
-/* Exported macro ------------------------------------------------------------*/
-#define COUNT_OF_EXAMPLE(x) (sizeof(x)/sizeof(BSP_DemoTypedef))
-
-/*Comment this define if you want to configure and start acquisition
-depending on USB functionalities implemented by user*/
-#define DISABLE_USB_DRIVEN_ACQUISITION
-#define USB_IRQHandler OTG_FS_IRQHandler
-/* Exported functions ------------------------------------------------------- */
-void Temperature_Test(void);
-void Gyro_Test(void);
-void Accelero_Test(void);
-void Proximity_Test(void);
-void led_demo(void);
-uint8_t CheckForUserInput(void);
-void Display_Demo(void);
-void LCD_demo(void);
-void Led_demo(void);
-void QSPI_demo (void);
-void Audio_Record_Demo(void);
-
-void Error_Handler(void);
-uint32_t Serial_Scanf(uint32_t value);
-
-#endif /* MAIN_H */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Inc/s25fl128s_conf.h b/Projects/STM32WB5MM-DK/Examples/BSP/Inc/s25fl128s_conf.h
deleted file mode 100644
index aa795a840..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Inc/s25fl128s_conf.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- ******************************************************************************
- * @file s25fl128s_conf.h
- * @author MCD Application Team
- * @brief This file contains the configurations of the S25FL128S QSPI memory.
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2020-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __S25FL128S_CONF_H
-#define __S25FL128S_CONF_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32wbxx.h"
-
-/** @addtogroup BSP
- * @{
- */
-
-#define CONF_S25FL128S_READ_ENHANCE 0 /* MMP performance enhance read enable/disable */
-#define CONF_QSPI_DUMMY_CLOCK 8U
-
-/* Dummy cycles for STR read mode */
-#define S25FL128S_DUMMY_CYCLES_READ_QUAD 8U
-#define S25FL128S_DUMMY_CYCLES_READ 8U
-#define S25FL128S_DUMMY_CYCLES_READ_DUAL_INOUT 5U
-#define S25FL128S_DUMMY_CYCLES_READ_QUAD_INOUT 6U
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __S25FL128S_CONF_H */
-
-/**
- * @}
- */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Inc/stlogo.h b/Projects/STM32WB5MM-DK/Examples/BSP/Inc/stlogo.h
deleted file mode 100644
index 6cd93a1b8..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Inc/stlogo.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- ******************************************************************************
- * @file stlogo.h
- * @author MCD Application Team
- * @brief ST Log BMP image
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2020-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-__ALIGN_END const uint8_t stlogo[1078]=
-{
-
-0x42,0x4d,0x36,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00,
-0x00,0x00,0x80,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x01,0x00,0x10,0x00,0x00,0x00,
-0x00,0x00,0xa0,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,
-
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-0x7F,0x3F,0xBF,0xDF,0xCF,0xEF,0xEF,0xEF,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,
-0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,
-0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,
-0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,
-0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,
-0xF7,0xF7,0xF7,0xF7,0x77,0x8F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x1F,0xC7,0xF1,0xFC,
-0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x3F,0x3F,0x1F,0x1F,0x1F,0x0F,0x0F,0x0F,
-0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
-0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
-0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
-0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
-0x0F,0x0F,0xCF,0xF1,0xFC,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x9F,0xE3,0xF8,0xFF,0xFF,0xFF,0xFF,
-0xFF,0xFF,0xFF,0xFF,0x0F,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,
-0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,
-0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,
-0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,
-0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0xE0,
-0xF8,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-0xFF,0xFF,0xFF,0xFF,0xFF,0x3F,0x8F,0xF3,0xFC,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-0xFF,0xFF,0xFF,0xFF,0xE0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x07,
-0x0F,0x1F,0x3F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-0xFF,0x3F,0x0F,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xF0,0xFC,0xFF,0xFF,
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x9F,0xE3,0xFC,0xFF,0xFF,
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-0xFF,0xFF,0x1F,0xC7,0xF9,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFC,0xF8,0xF0,0xE0,0xC0,0x80,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0F,0x0F,0x1F,0x7F,0xFF,0xFF,0xFF,0xFF,
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x1F,0x07,
-0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xF8,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x3F,0xCF,0xF1,0xFC,0xFF,0xFF,0xFF,0xFF,0xFF,
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x1F,
-0xE3,0xF8,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,
-0xFC,0xF8,0xF8,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x1F,0x03,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0xE0,0xF8,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-0xFF,0xFF,0xFF,0xFF,0x1F,0xC7,0xF9,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x3F,0x0F,0x03,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xF0,0xFC,0xFF,0xFF,
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x3F,0x0F,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x80,0xF0,0xFC,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x3F,
-0x9F,0xCF,0xF3,0xF8,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFD,0xF8,0xF8,0xF8,0xF8,0xF8,
-0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,
-0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,
-0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xFA,0xFA,0xFB,0xFB,0xFB,0xFB,0xFB,0xFB,0xFB,
-0xFB,0xFB,0xFB,0xFB,0xFB,0xFB,0xF9,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,
-0xFA,0xFB,0xFB,0xFB,0xFB,0xFB,0xFB,0xFB,0xFB,0xFB,0xF9,0xFD,0xFD,0xFE,0xFE,0xFF,
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF
-};
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Inc/stm32wb5mm_dk_conf.h b/Projects/STM32WB5MM-DK/Examples/BSP/Inc/stm32wb5mm_dk_conf.h
deleted file mode 100644
index 49826c0cd..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Inc/stm32wb5mm_dk_conf.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- ******************************************************************************
- * @file stm32wb5mm_dk_conf_template.h
- * @author MCD Application Team
- * @brief configuration file.
- * This file should be copied to the application folder and renamed
- * to stm32wb5mm_dk_conf.h
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2019-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef STM32WB5MM_DK_CONF_H
-#define STM32WB5MM_DK_CONF_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32wbxx_hal.h"
-
-/* Environmental Sensors usage */
-#define USE_ENV_SENSOR_STTS22H_0 1U
-#define USE_ENV_SENSOR_LPS22HH_0 0U
-
-/* Motion Sensors usage */
-#define USE_MOTION_SENSOR_ISM330DHCX_0 1U
-#define USE_MOTION_SENSOR_IIS2MDC_0 0U
-
-/* COM port usage */
-#define USE_BSP_COM_FEATURE 1U
-#define USE_COM_LOG 0U
-
-/* IRQ priorities */
-#define BSP_BUTTON_USERx_IT_PRIORITY 0x0FUL
-#define PWM_LED_CLOCK_IT_PRIORITY 0x03UL
-
-/* I2C3 Frequency in Hz */
-#define BUS_I2C3_FREQUENCY 100000UL /* Frequency of I2C3 = 100 KHz*/
-
-/* Indicates whether or not TCXO is supported by the board
- * 0: TCXO not supported
- * 1: TCXO supported
- */
-#define IS_TCXO_SUPPORTED 0U
-
-/* Indicates whether or not DCDC is supported by the board
- * 0: DCDC not supported
- * 1: DCDC supported
- */
-#define IS_DCDC_SUPPORTED 1U
-
-#define STM32WB5MM_DK_I2C_Init BSP_I2C3_Init
-#define STM32WB5MM_DK_I2C_DeInit BSP_I2C3_DeInit
-#define STM32WB5MM_DK_I2C_ReadReg BSP_I2C3_ReadReg
-#define STM32WB5MM_DK_I2C_WriteReg BSP_I2C3_WriteReg
-
-#define STM32WB5MM_DK_GetTick BSP_GetTick
-
-/*Number of millisecond of audio at each DMA interrupt*/
-#define N_MS_PER_INTERRUPT (20U)
-
-#define AUDIO_IN_CHANNELS 1
-#define AUDIO_IN_SAMPLING_FREQUENCY 16000
-
-#define AUDIO_CHANNELS_OUT 1
-#define AUDIO_OUT_SAMPLING_FREQUENCY 16000
-
-#define AUDIO_IN_BUFFER_SIZE DEFAULT_AUDIO_IN_BUFFER_SIZE
-
-#if (AUDIO_IN_SAMPLING_FREQUENCY == 8000)
-#define MAX_DECIMATION_FACTOR 160
-#else
-#define MAX_DECIMATION_FACTOR 128
-#endif
-
-#define MAX_MIC_FREQ 1280 /*kHz - Maximum PDM clock */
-#define MAX_AUDIO_IN_CHANNEL_NBR_PER_IF 1 /* Maximum number of microhpones channels for peripheral interface */
-#define MAX_AUDIO_IN_CHANNEL_NBR_TOTAL 1
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* STM32WB5MM_DK_CONF_H */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Inc/stm32wbxx_hal_conf.h b/Projects/STM32WB5MM-DK/Examples/BSP/Inc/stm32wbxx_hal_conf.h
deleted file mode 100644
index c74656542..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Inc/stm32wbxx_hal_conf.h
+++ /dev/null
@@ -1,353 +0,0 @@
-/* USER CODE BEGIN Header */
-/**
- ******************************************************************************
- * @file stm32wbxx_hal_conf.h
- * @author MCD Application Team
- * @brief HAL configuration file.
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2019 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-/* USER CODE END Header */
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef STM32WBxx_HAL_CONF_H
-#define STM32WBxx_HAL_CONF_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Exported types ------------------------------------------------------------*/
-/* Exported constants --------------------------------------------------------*/
-
-/* ########################## Module Selection ############################## */
-/**
- * @brief This is the list of modules to be used in the HAL driver
- */
-#define HAL_MODULE_ENABLED
-//#define HAL_ADC_MODULE_ENABLED
-//#define HAL_COMP_MODULE_ENABLED
-#define HAL_CORTEX_MODULE_ENABLED
-//#define HAL_CRC_MODULE_ENABLED
-//#define HAL_CRYP_MODULE_ENABLED
-#define HAL_DMA_MODULE_ENABLED
-#define HAL_EXTI_MODULE_ENABLED
-#define HAL_FLASH_MODULE_ENABLED
-#define HAL_GPIO_MODULE_ENABLED
-//#define HAL_HSEM_MODULE_ENABLED
-#define HAL_I2C_MODULE_ENABLED
-//#define HAL_IPCC_MODULE_ENABLED
-//#define HAL_IRDA_MODULE_ENABLED
-//#define HAL_IWDG_MODULE_ENABLED
-//#define HAL_LCD_MODULE_ENABLED
-//#define HAL_LPTIM_MODULE_ENABLED
-#define HAL_PCD_MODULE_ENABLED
-//#define HAL_PKA_MODULE_ENABLED
-#define HAL_PWR_MODULE_ENABLED
-#define HAL_QSPI_MODULE_ENABLED
-#define HAL_RCC_MODULE_ENABLED
-//#define HAL_RNG_MODULE_ENABLED
-//#define HAL_RTC_MODULE_ENABLED
-#define HAL_SAI_MODULE_ENABLED
-//#define HAL_SMARTCARD_MODULE_ENABLED
-//#define HAL_SMBUS_MODULE_ENABLED
-#define HAL_SPI_MODULE_ENABLED
-#define HAL_TIM_MODULE_ENABLED
-#define HAL_TSC_MODULE_ENABLED
-#define HAL_UART_MODULE_ENABLED
-//#define HAL_USART_MODULE_ENABLED
-//#define HAL_WWDG_MODULE_ENABLED
-
-#define USE_HAL_ADC_REGISTER_CALLBACKS 0u
-#define USE_HAL_COMP_REGISTER_CALLBACKS 0u
-#define USE_HAL_CRYP_REGISTER_CALLBACKS 0u
-#define USE_HAL_I2C_REGISTER_CALLBACKS 0u
-#define USE_HAL_I2C_REGISTER_CALLBACKS 0u
-#define USE_HAL_IRDA_REGISTER_CALLBACKS 0u
-#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0u
-#define USE_HAL_PCD_REGISTER_CALLBACKS 0u
-#define USE_HAL_PKA_REGISTER_CALLBACKS 0u
-#define USE_HAL_QSPI_REGISTER_CALLBACKS 0u
-#define USE_HAL_RNG_REGISTER_CALLBACKS 0u
-#define USE_HAL_RTC_REGISTER_CALLBACKS 0u
-#define USE_HAL_SAI_REGISTER_CALLBACKS 0u
-#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0u
-#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0u
-#define USE_HAL_SPI_REGISTER_CALLBACKS 0u
-#define USE_HAL_TIM_REGISTER_CALLBACKS 1u
-#define USE_HAL_TSC_REGISTER_CALLBACKS 0u
-#define USE_HAL_UART_REGISTER_CALLBACKS 0u
-#define USE_HAL_USART_REGISTER_CALLBACKS 0u
-#define USE_HAL_WWDG_REGISTER_CALLBACKS 0u
-
-/* ########################## Oscillator Values adaptation ####################*/
-/**
- * @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
- * This value is used by the RCC HAL module to compute the system frequency
- * (when HSE is used as system clock source, directly or through the PLL).
- */
-
-#if !defined (HSE_VALUE)
- #define HSE_VALUE (32000000UL) /*!< Value of the External oscillator in Hz */
-#endif /* HSE_VALUE */
-
-#if !defined (HSE_STARTUP_TIMEOUT)
- #define HSE_STARTUP_TIMEOUT (100UL) /*!< Time out for HSE start up, in ms */
-#endif /* HSE_STARTUP_TIMEOUT */
-
-/**
- * @brief Internal Multiple Speed oscillator (MSI) default value.
- * This value is the default MSI range value after Reset.
- */
-#if !defined (MSI_VALUE)
- #define MSI_VALUE (4000000UL) /*!< Value of the Internal oscillator in Hz*/
-#endif /* MSI_VALUE */
-
-/**
- * @brief Internal High Speed oscillator (HSI) value.
- * This value is used by the RCC HAL module to compute the system frequency
- * (when HSI is used as system clock source, directly or through the PLL).
- */
-#if !defined (HSI_VALUE)
- #define HSI_VALUE (16000000UL) /*!< Value of the Internal oscillator in Hz*/
-#endif /* HSI_VALUE */
-
-/**
- * @brief Internal Low Speed oscillator (LSI1) value.
- */
-#if !defined (LSI1_VALUE)
- #define LSI1_VALUE (32000UL) /*!< LSI1 Typical Value in Hz*/
-#endif /* LSI1_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
- The real value may vary depending on the variations
- in voltage and temperature.*/
-/**
- * @brief Internal Low Speed oscillator (LSI2) value.
- */
-#if !defined (LSI2_VALUE)
- #define LSI2_VALUE (32000UL) /*!< LSI2 Typical Value in Hz*/
-#endif /* LSI2_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
- The real value may vary depending on the variations
- in voltage and temperature.*/
-
-/**
- * @brief External Low Speed oscillator (LSE) value.
- * This value is used by the UART, RTC HAL module to compute the system frequency
- */
-#if !defined (LSE_VALUE)
- #define LSE_VALUE (32774UL) /*!< Value of the External oscillator in Hz*/
-#endif /* LSE_VALUE */
-
-/**
- * @brief Internal Multiple Speed oscillator (HSI48) default value.
- * This value is the default HSI48 range value after Reset.
- */
-#if !defined (HSI48_VALUE)
- #define HSI48_VALUE (48000000UL) /*!< Value of the Internal oscillator in Hz*/
-#endif /* HSI48_VALUE */
-
-#if !defined (LSE_STARTUP_TIMEOUT)
- #define LSE_STARTUP_TIMEOUT (5000UL) /*!< Time out for LSE start up, in ms */
-#endif /* LSE_STARTUP_TIMEOUT */
-
-/**
- * @brief External clock source for SAI1 peripheral
- * This value is used by the RCC HAL module to compute the SAI1 & SAI2 clock source
- * frequency.
- */
-#if !defined (EXTERNAL_SAI1_CLOCK_VALUE)
- #define EXTERNAL_SAI1_CLOCK_VALUE (48000UL) /*!< Value of the SAI1 External clock source in Hz*/
-#endif /* EXTERNAL_SAI1_CLOCK_VALUE */
-
-/* Tip: To avoid modifying this file each time you need to use different HSE,
- === you can define the HSE value in your toolchain compiler preprocessor. */
-
-/* ########################### System Configuration ######################### */
-/**
- * @brief This is the HAL system configuration section
- */
-#define VDD_VALUE (3300UL) /*!< Value of VDD in mv */
-#define TICK_INT_PRIORITY ((1UL<<__NVIC_PRIO_BITS) - 1UL) /*!< tick interrupt priority (lowest by default) */
-#define USE_RTOS 0U
-#define PREFETCH_ENABLE 0U
-#define INSTRUCTION_CACHE_ENABLE 1U
-#define DATA_CACHE_ENABLE 1U
-
-/* ########################## Assert Selection ############################## */
-/**
- * @brief Uncomment the line below to expanse the "assert_param" macro in the
- * HAL drivers code
- */
-/* #define USE_FULL_ASSERT 1U */
-
-/* ################## SPI peripheral configuration ########################## */
-
-/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
- * Activated: CRC code is present inside driver
- * Deactivated: CRC code cleaned from driver
- */
-
-#define USE_SPI_CRC 1U
-
-/* Includes ------------------------------------------------------------------*/
-/**
- * @brief Include module's header file
- */
-#ifdef HAL_DMA_MODULE_ENABLED
- #include "stm32wbxx_hal_dma.h"
-#endif /* HAL_DMA_MODULE_ENABLED */
-
-#ifdef HAL_ADC_MODULE_ENABLED
- #include "stm32wbxx_hal_adc.h"
-#endif /* HAL_ADC_MODULE_ENABLED */
-
-#ifdef HAL_COMP_MODULE_ENABLED
- #include "stm32wbxx_hal_comp.h"
-#endif /* HAL_COMP_MODULE_ENABLED */
-
-#ifdef HAL_CORTEX_MODULE_ENABLED
- #include "stm32wbxx_hal_cortex.h"
-#endif /* HAL_CORTEX_MODULE_ENABLED */
-
-#ifdef HAL_CRC_MODULE_ENABLED
- #include "stm32wbxx_hal_crc.h"
-#endif /* HAL_CRC_MODULE_ENABLED */
-
-#ifdef HAL_CRYP_MODULE_ENABLED
- #include "stm32wbxx_hal_cryp.h"
-#endif /* HAL_CRYP_MODULE_ENABLED */
-
-#ifdef HAL_EXTI_MODULE_ENABLED
- #include "stm32wbxx_hal_exti.h"
-#endif /* HAL_EXTI_MODULE_ENABLED */
-
-#ifdef HAL_FLASH_MODULE_ENABLED
- #include "stm32wbxx_hal_flash.h"
-#endif /* HAL_FLASH_MODULE_ENABLED */
-
-#ifdef HAL_GPIO_MODULE_ENABLED
- #include "stm32wbxx_hal_gpio.h"
-#endif /* HAL_GPIO_MODULE_ENABLED */
-
-#ifdef HAL_HSEM_MODULE_ENABLED
- #include "stm32wbxx_hal_hsem.h"
-#endif /* HAL_HSEM_MODULE_ENABLED */
-
-#ifdef HAL_I2C_MODULE_ENABLED
- #include "stm32wbxx_hal_i2c.h"
-#endif /* HAL_I2C_MODULE_ENABLED */
-
-#ifdef HAL_IPCC_MODULE_ENABLED
- #include "stm32wbxx_hal_ipcc.h"
-#endif /* HAL_IPCC_MODULE_ENABLED */
-
-#ifdef HAL_IRDA_MODULE_ENABLED
- #include "stm32wbxx_hal_irda.h"
-#endif /* HAL_IRDA_MODULE_ENABLED */
-
-#ifdef HAL_IWDG_MODULE_ENABLED
- #include "stm32wbxx_hal_iwdg.h"
-#endif /* HAL_IWDG_MODULE_ENABLED */
-
-#ifdef HAL_LCD_MODULE_ENABLED
- #include "stm32wbxx_hal_lcd.h"
-#endif /* HAL_LCD_MODULE_ENABLED */
-
-#ifdef HAL_LPTIM_MODULE_ENABLED
- #include "stm32wbxx_hal_lptim.h"
-#endif /* HAL_LPTIM_MODULE_ENABLED */
-
-#ifdef HAL_PCD_MODULE_ENABLED
- #include "stm32wbxx_hal_pcd.h"
-#endif /* HAL_PCD_MODULE_ENABLED */
-
-#ifdef HAL_PKA_MODULE_ENABLED
- #include "stm32wbxx_hal_pka.h"
-#endif /* HAL_PKA_MODULE_ENABLED */
-
-#ifdef HAL_PWR_MODULE_ENABLED
- #include "stm32wbxx_hal_pwr.h"
-#endif /* HAL_PWR_MODULE_ENABLED */
-
-#ifdef HAL_QSPI_MODULE_ENABLED
- #include "stm32wbxx_hal_qspi.h"
-#endif /* HAL_QSPI_MODULE_ENABLED */
-
-#ifdef HAL_RCC_MODULE_ENABLED
- #include "stm32wbxx_hal_rcc.h"
-#endif /* HAL_RCC_MODULE_ENABLED */
-
-#ifdef HAL_RNG_MODULE_ENABLED
- #include "stm32wbxx_hal_rng.h"
-#endif /* HAL_RNG_MODULE_ENABLED */
-
-#ifdef HAL_RTC_MODULE_ENABLED
- #include "stm32wbxx_hal_rtc.h"
-#endif /* HAL_RTC_MODULE_ENABLED */
-
-#ifdef HAL_SAI_MODULE_ENABLED
- #include "stm32wbxx_hal_sai.h"
-#endif /* HAL_SAI_MODULE_ENABLED */
-
-#ifdef HAL_SMARTCARD_MODULE_ENABLED
- #include "stm32wbxx_hal_smartcard.h"
-#endif /* HAL_SMARTCARD_MODULE_ENABLED */
-
-#ifdef HAL_SMBUS_MODULE_ENABLED
- #include "stm32wbxx_hal_smbus.h"
-#endif /* HAL_SMBUS_MODULE_ENABLED */
-
-#ifdef HAL_SPI_MODULE_ENABLED
- #include "stm32wbxx_hal_spi.h"
-#endif /* HAL_SPI_MODULE_ENABLED */
-
-#ifdef HAL_TIM_MODULE_ENABLED
- #include "stm32wbxx_hal_tim.h"
-#endif /* HAL_TIM_MODULE_ENABLED */
-
-#ifdef HAL_TSC_MODULE_ENABLED
- #include "stm32wbxx_hal_tsc.h"
-#endif /* HAL_TSC_MODULE_ENABLED */
-
-#ifdef HAL_UART_MODULE_ENABLED
- #include "stm32wbxx_hal_uart.h"
-#endif /* HAL_UART_MODULE_ENABLED */
-
-#ifdef HAL_USART_MODULE_ENABLED
- #include "stm32wbxx_hal_usart.h"
-#endif /* HAL_USART_MODULE_ENABLED */
-
-#ifdef HAL_WWDG_MODULE_ENABLED
- #include "stm32wbxx_hal_wwdg.h"
-#endif /* HAL_WWDG_MODULE_ENABLED */
-
-/* Exported macro ------------------------------------------------------------*/
-#ifdef USE_FULL_ASSERT
-/**
- * @brief The assert_param macro is used for function's parameters check.
- * @param expr If expr is false, it calls assert_failed function
- * which reports the name of the source file and the source
- * line number of the call that failed.
- * If expr is true, it returns no value.
- * @retval None
- */
- #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
-/* Exported functions ------------------------------------------------------- */
- void assert_failed(uint8_t* file, uint32_t line);
-#else
- #define assert_param(expr) ((void)0U)
-#endif /* USE_FULL_ASSERT */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* STM32WBxx_HAL_CONF_H */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Inc/stm32wbxx_it.h b/Projects/STM32WB5MM-DK/Examples/BSP/Inc/stm32wbxx_it.h
deleted file mode 100644
index 6eeeb7052..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Inc/stm32wbxx_it.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- ******************************************************************************
- * @file BSP/Inc/stm32wlxx_it.h
- * @author MCD Application Team
- * @brief This file contains the headers of the interrupt handlers.
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2017(-2021) STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __STM32WLxx_IT_H
-#define __STM32WLxx_IT_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-/* Exported types ------------------------------------------------------------*/
-/* Exported constants --------------------------------------------------------*/
-/* Exported macros -----------------------------------------------------------*/
-/* Exported functions ------------------------------------------------------- */
-
-void NMI_Handler(void);
-void HardFault_Handler(void);
-void SVC_Handler(void);
-void PendSV_Handler(void);
-void SysTick_Handler(void);
-void DMA1_Channel1_IRQHandler(void);
-void USB_LP_IRQHandler(void);
-
-void MemManage_Handler(void);
-void BusFault_Handler(void);
-void UsageFault_Handler(void);
-void DebugMon_Handler(void);
-
-void EXTI0_IRQHandler(void);
-void EXTI15_10_IRQHandler(void);
-
-/* TMP */
-void TIM1_TRG_COM_TIM17_IRQHandler(void);
-/* TMP */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM32WLxx_IT_H */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Inc/usb/usbd_audio_if.h b/Projects/STM32WB5MM-DK/Examples/BSP/Inc/usb/usbd_audio_if.h
deleted file mode 100644
index 61123819d..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Inc/usb/usbd_audio_if.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- ******************************************************************************
- * @file usbd_audio_if.h
- * @author MCD Application Team
- * @brief Header for usbd_audio_if.c file.
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2020-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __USBD_AUDIO_IF_H
-#define __USBD_AUDIO_IF_H
-
-/* Includes ------------------------------------------------------------------*/
-#include "usbd_audio_in.h"
-#include "main.h"
-/* Exported types ------------------------------------------------------------*/
-/* Exported constants --------------------------------------------------------*/
-/* Exported macro ------------------------------------------------------------*/
-/* Exported functions ------------------------------------------------------- */
-void Send_Audio_to_USB(int16_t * audioData, uint16_t PCMSamples);
-
-
-#endif /* __USBD_AUDIO_IF_H */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Inc/usb/usbd_audio_in.h b/Projects/STM32WB5MM-DK/Examples/BSP/Inc/usb/usbd_audio_in.h
deleted file mode 100644
index 8e4b67521..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Inc/usb/usbd_audio_in.h
+++ /dev/null
@@ -1,198 +0,0 @@
-/**
- ******************************************************************************
- * @file usbd_audio_in.h
- * @author MCD Application Team
- * @brief header file for the usbd_audio_in.c file.
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2020-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Includes ------------------------------------------------------------------*/
-
-#ifndef __USBD_AUDIO_IN_H
-#define __USBD_AUDIO_IN_H
-
-#include "usbd_ioreq.h"
-
-/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
- * @{
- */
-
-/** @defgroup USBD_AUDIO_IN
- * @{
- */
-
-/** @defgroup USBD_AUDIO_IN_Exported_Defines
- * @{
- */
-
-#define AUDIO_OUT_EP 0x01
-#define USB_AUDIO_CONFIG_DESC_SIZ 109
-#define AUDIO_INTERFACE_DESC_SIZE 9
-#define USB_AUDIO_DESC_SIZ 0x09
-#define AUDIO_STANDARD_ENDPOINT_DESC_SIZE 0x09
-#define AUDIO_STREAMING_ENDPOINT_DESC_SIZE 0x07
-#define AUDIO_DESCRIPTOR_TYPE 0x21
-#define USB_DEVICE_CLASS_AUDIO 0x01
-#define AUDIO_SUBCLASS_AUDIOCONTROL 0x01
-#define AUDIO_SUBCLASS_AUDIOSTREAMING 0x02
-#define AUDIO_PROTOCOL_UNDEFINED 0x00
-#define AUDIO_STREAMING_GENERAL 0x01
-#define AUDIO_STREAMING_FORMAT_TYPE 0x02
-/* Audio Descriptor Types */
-#define AUDIO_INTERFACE_DESCRIPTOR_TYPE 0x24
-#define AUDIO_ENDPOINT_DESCRIPTOR_TYPE 0x25
-/* Audio Control Interface Descriptor Subtypes */
-#define AUDIO_CONTROL_HEADER 0x01
-#define AUDIO_CONTROL_INPUT_TERMINAL 0x02
-#define AUDIO_CONTROL_OUTPUT_TERMINAL 0x03
-#define AUDIO_CONTROL_FEATURE_UNIT 0x06
-#define AUDIO_INPUT_TERMINAL_DESC_SIZE 0x0C
-#define AUDIO_OUTPUT_TERMINAL_DESC_SIZE 0x09
-#define AUDIO_STREAMING_INTERFACE_DESC_SIZE 0x07
-#define AUDIO_CONTROL_MUTE 0x0002
-#define AUDIO_FORMAT_TYPE_I 0x01
-#define AUDIO_FORMAT_TYPE_III 0x03
-#define AUDIO_ENDPOINT_GENERAL 0x01
-#define AUDIO_REQ_GET_CUR 0x81
-#define AUDIO_REQ_GET_MIN 0x82
-#define AUDIO_REQ_GET_MAX 0x83
-#define AUDIO_REQ_GET_RES 0x84
-#define AUDIO_REQ_SET_CUR 0x01
-#define AUDIO_OUT_STREAMING_CTRL 0x02
-#define VOL_MIN 0xDBE0
-#define VOL_RES 0x0023
-#define VOL_MAX 0x0000
-#define AUDIO_IN_PACKET (uint32_t)((((48000/1000)+2)*8)*2)
-#define MIC_IN_TERMINAL_ID 1
-#define MIC_FU_ID 2
-#define MIC_OUT_TERMINAL_ID 3
-#define USB_INTERFACE_DESCRIPTOR_TYPE 0x04
-/* Audio Data in endpoint */
-#define AUDIO_IN_EP 0x81
-
-/* Buffering state definitions */
-typedef enum
-{
- STATE_USB_WAITING_FOR_INIT = 0,
- STATE_USB_IDLE = 1,
- STATE_USB_REQUESTS_STARTED = 2,
- STATE_USB_BUFFER_WRITE_STARTED = 3,
-}AUDIO_StatesTypeDef;
-
-/* Number of sub-packets in the audio transfer buffer.*/
-#define AUDIO_IN_PACKET_NUM 6
-
-#define TIMEOUT_VALUE 200
-
-/* Audio Commands enmueration */
-typedef enum
-{
- AUDIO_CMD_START = 1,
- AUDIO_CMD_PLAY,
- AUDIO_CMD_STOP,
-}AUDIO_CMD_TypeDef;
-
-typedef enum
-{
- AUDIO_OFFSET_NONE = 0,
- AUDIO_OFFSET_HALF,
- AUDIO_OFFSET_FULL,
- AUDIO_OFFSET_UNKNOWN,
-}AUDIO_OffsetTypeDef;
-
-
-/**
- * @}
- */
-
-/** @defgroup USBD_AUDIO_IN_Exported_TypesDefinitions
- * @{
- */
-typedef struct
-{
- uint8_t cmd;
- uint8_t data[USB_MAX_EP0_SIZE];
- uint8_t len;
- uint8_t unit;
-}USBD_AUDIO_ControlTypeDef;
-
-typedef struct
-{
- __IO uint32_t alt_setting;
- uint8_t channels;
- uint32_t frequency;
- __IO int16_t timeout;
- uint16_t buffer_length;
- uint16_t dataAmount;
- uint16_t paketDimension;
- uint8_t state;
- uint16_t rd_ptr;
- uint16_t wr_ptr;
- uint8_t upper_treshold;
- uint8_t lower_treshold;
- USBD_AUDIO_ControlTypeDef control;
- uint8_t * buffer;
-}USBD_AUDIO_HandleTypeDef;
-
-typedef struct
-{
- int8_t (*Init) (uint32_t AudioFreq, uint32_t BitRes, uint32_t ChnlNbr);
- int8_t (*DeInit) (uint32_t options);
- int8_t (*Record) (void);
- int8_t (*VolumeCtl) (int16_t Volume);
- int8_t (*MuteCtl) (uint8_t cmd);
- int8_t (*Stop) (void);
- int8_t (*Pause) (void);
- int8_t (*Resume) (void);
- int8_t (*CommandMgr) (uint8_t cmd);
-}USBD_AUDIO_ItfTypeDef;
-/**
- * @}
- */
-
-/** @defgroup USBD_AUDIO_IN_Exported_Macros
- * @{
- */
-
-/**
- * @}
- */
-
-/** @defgroup USBD_AUDIO_IN_Exported_Variables
- * @{
- */
-extern USBD_ClassTypeDef USBD_AUDIO;
-/**
- * @}
- */
-
-/** @defgroup USBD_AUDIO_IN_Exported_Functions
- * @{
- */
-uint8_t USBD_AUDIO_RegisterInterface (USBD_HandleTypeDef *pdev, USBD_AUDIO_ItfTypeDef *fops);
-void USBD_AUDIO_Init_Microphone_Descriptor(USBD_HandleTypeDef *pdev, uint32_t samplingFrequency, uint8_t Channels);
-uint8_t USBD_AUDIO_Data_Transfer (USBD_HandleTypeDef *pdev, int16_t * audioData, uint16_t dataAmount);
-
-/**
- * @}
- */
-
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-#endif /* __USBD_AUDIO_IN_H */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Inc/usb/usbd_conf.h b/Projects/STM32WB5MM-DK/Examples/BSP/Inc/usb/usbd_conf.h
deleted file mode 100644
index 77f953129..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Inc/usb/usbd_conf.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- ******************************************************************************
- * @file usbd_conf.h
- * @author MCD Application Team
- * @brief General low level driver configuration
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2020-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Define to prevent recursive inclusion ------------------------------------- */
-#ifndef __USBD_CONF_H
-#define __USBD_CONF_H
-
-/* Includes ------------------------------------------------------------------ */
-#include "stm32wbxx_hal.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-/* Exported types ------------------------------------------------------------ */
-/* Exported constants -------------------------------------------------------- */
-/* Common Config */
-#define USBD_MAX_NUM_INTERFACES 2
-#define USBD_MAX_NUM_CONFIGURATION 1
-#define USBD_MAX_STR_DESC_SIZ 0x100
-#define USBD_SUPPORT_USER_STRING 0
-#define USBD_SELF_POWERED 1
-#define USBD_DEBUG_LEVEL 0
-
-/* Exported macro ------------------------------------------------------------ */
-/* Memory management macros */
-
-/* For footprint reasons and since only one allocation is handled in the HID
- * class driver, the malloc/free is changed into a static allocation method */
-
-void *USBD_static_malloc(uint32_t size);
-void USBD_static_free(void *p);
-
-#define MAX_STATIC_ALLOC_SIZE 4/* HID Class Driver Structure size */
-
-#define USBD_malloc malloc
-#define USBD_free free
-#define USBD_memset /* Not used */
-#define USBD_memcpy /* Not used */
-
-
-/* DEBUG macros */
-#if (USBD_DEBUG_LEVEL > 0)
-#define USBD_UsrLog(...) printf(__VA_ARGS__);\
- printf("\n");
-#else
-#define USBD_UsrLog(...)
-#endif
-
-#if (USBD_DEBUG_LEVEL > 1)
-
-#define USBD_ErrLog(...) printf("ERROR: ") ;\
- printf(__VA_ARGS__);\
- printf("\n");
-#else
-#define USBD_ErrLog(...)
-#endif
-
-#if (USBD_DEBUG_LEVEL > 2)
-#define USBD_DbgLog(...) printf("DEBUG : ") ;\
- printf(__VA_ARGS__);\
- printf("\n");
-#else
-#define USBD_DbgLog(...)
-#endif
-
-/* Exported functions ------------------------------------------------------- */
-
-#endif /* __USBD_CONF_H */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Inc/usb/usbd_desc.h b/Projects/STM32WB5MM-DK/Examples/BSP/Inc/usb/usbd_desc.h
deleted file mode 100644
index 2e11b91ef..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Inc/usb/usbd_desc.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- ******************************************************************************
- * @file usbd_desc.h
- * @author MCD Application Team
- * @brief Header for usbd_desc.c module
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2020-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __USBD_DESC_H
-#define __USBD_DESC_H
-
-/* Includes ------------------------------------------------------------------*/
-#include "usbd_def.h"
-
-/* Exported types ------------------------------------------------------------*/
-/* Exported constants --------------------------------------------------------*/
-/* Exported macro ------------------------------------------------------------*/
-/* Exported functions ------------------------------------------------------- */
-extern USBD_DescriptorsTypeDef AUDIO_Desc;
-
-#endif /* __USBD_DESC_H */
-
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/MDK-ARM/Project.uvoptx b/Projects/STM32WB5MM-DK/Examples/BSP/MDK-ARM/Project.uvoptx
deleted file mode 100644
index 2362a14a0..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/MDK-ARM/Project.uvoptx
+++ /dev/null
@@ -1,1117 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
-<ProjectOpt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_optx.xsd">
-
- <SchemaVersion>1.0</SchemaVersion>
-
- <Header>### uVision Project, (C) Keil Software</Header>
-
- <Extensions>
- <cExt>*.c</cExt>
- <aExt>*.s*; *.src; *.a*</aExt>
- <oExt>*.obj; *.o</oExt>
- <lExt>*.lib</lExt>
- <tExt>*.txt; *.h; *.inc</tExt>
- <pExt>*.plm</pExt>
- <CppX>*.cpp</CppX>
- <nMigrate>0</nMigrate>
- </Extensions>
-
- <DaveTm>
- <dwLowDateTime>0</dwLowDateTime>
- <dwHighDateTime>0</dwHighDateTime>
- </DaveTm>
-
- <Target>
- <TargetName>STM32WB5MM-DK</TargetName>
- <ToolsetNumber>0x4</ToolsetNumber>
- <ToolsetName>ARM-ADS</ToolsetName>
- <TargetOption>
- <CLKADS>12000000</CLKADS>
- <OPTTT>
- <gFlags>1</gFlags>
- <BeepAtEnd>1</BeepAtEnd>
- <RunSim>0</RunSim>
- <RunTarget>1</RunTarget>
- <RunAbUc>0</RunAbUc>
- </OPTTT>
- <OPTHX>
- <HexSelection>1</HexSelection>
- <FlashByte>65535</FlashByte>
- <HexRangeLowAddress>0</HexRangeLowAddress>
- <HexRangeHighAddress>0</HexRangeHighAddress>
- <HexOffset>0</HexOffset>
- </OPTHX>
- <OPTLEX>
- <PageWidth>79</PageWidth>
- <PageLength>66</PageLength>
- <TabStop>8</TabStop>
- <ListingPath></ListingPath>
- </OPTLEX>
- <ListingPage>
- <CreateCListing>1</CreateCListing>
- <CreateAListing>1</CreateAListing>
- <CreateLListing>1</CreateLListing>
- <CreateIListing>0</CreateIListing>
- <AsmCond>1</AsmCond>
- <AsmSymb>1</AsmSymb>
- <AsmXref>0</AsmXref>
- <CCond>1</CCond>
- <CCode>0</CCode>
- <CListInc>0</CListInc>
- <CSymb>0</CSymb>
- <LinkerCodeListing>0</LinkerCodeListing>
- </ListingPage>
- <OPTXL>
- <LMap>1</LMap>
- <LComments>1</LComments>
- <LGenerateSymbols>1</LGenerateSymbols>
- <LLibSym>1</LLibSym>
- <LLines>1</LLines>
- <LLocSym>1</LLocSym>
- <LPubSym>1</LPubSym>
- <LXref>0</LXref>
- <LExpSel>0</LExpSel>
- </OPTXL>
- <OPTFL>
- <tvExp>1</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <IsCurrentTarget>1</IsCurrentTarget>
- </OPTFL>
- <CpuCode>18</CpuCode>
- <DebugOpt>
- <uSim>0</uSim>
- <uTrg>1</uTrg>
- <sLdApp>1</sLdApp>
- <sGomain>1</sGomain>
- <sRbreak>1</sRbreak>
- <sRwatch>1</sRwatch>
- <sRmem>1</sRmem>
- <sRfunc>1</sRfunc>
- <sRbox>1</sRbox>
- <tLdApp>1</tLdApp>
- <tGomain>1</tGomain>
- <tRbreak>1</tRbreak>
- <tRwatch>1</tRwatch>
- <tRmem>1</tRmem>
- <tRfunc>1</tRfunc>
- <tRbox>1</tRbox>
- <tRtrace>1</tRtrace>
- <sRSysVw>1</sRSysVw>
- <tRSysVw>1</tRSysVw>
- <sRunDeb>0</sRunDeb>
- <sLrtime>0</sLrtime>
- <bEvRecOn>1</bEvRecOn>
- <bSchkAxf>0</bSchkAxf>
- <bTchkAxf>0</bTchkAxf>
- <nTsel>6</nTsel>
- <sDll></sDll>
- <sDllPa></sDllPa>
- <sDlgDll></sDlgDll>
- <sDlgPa></sDlgPa>
- <sIfile></sIfile>
- <tDll></tDll>
- <tDllPa></tDllPa>
- <tDlgDll></tDlgDll>
- <tDlgPa></tDlgPa>
- <tIfile></tIfile>
- <pMon>STLink\ST-LINKIII-KEIL_SWO.dll</pMon>
- </DebugOpt>
- <TargetDriverDllRegistry>
- <SetRegEntry>
- <Number>0</Number>
- <Key>UL2CM3</Key>
- <Name>UL2CM3(-S0 -C0 -P0 ) -FN1 -FC1000 -FD20000000 -FF0STM32WB5x_M4_1024 -FL0100000 -FS08000000 -FP0($$Device:STM32WB5MMGHx$CMSIS\Flash\STM32WB5x_M4_1024.FLM)</Name>
- </SetRegEntry>
- <SetRegEntry>
- <Number>0</Number>
- <Key>ST-LINKIII-KEIL_SWO</Key>
- <Name>UL2CM3(-S0 -C0 -P0 ) -FN1 -FC1000 -FD20000000 -FF0STM32WB5x_M4_1024 -FL0100000 -FS08000000 -FP0($$Device:STM32WB5MMGHx$CMSIS\Flash\STM32WB5x_M4_1024.FLM)</Name>
- </SetRegEntry>
- </TargetDriverDllRegistry>
- <Breakpoint/>
- <Tracepoint>
- <THDelay>0</THDelay>
- </Tracepoint>
- <DebugFlag>
- <trace>0</trace>
- <periodic>1</periodic>
- <aLwin>1</aLwin>
- <aCover>0</aCover>
- <aSer1>0</aSer1>
- <aSer2>0</aSer2>
- <aPa>0</aPa>
- <viewmode>1</viewmode>
- <vrSel>0</vrSel>
- <aSym>0</aSym>
- <aTbox>0</aTbox>
- <AscS1>0</AscS1>
- <AscS2>0</AscS2>
- <AscS3>0</AscS3>
- <aSer3>0</aSer3>
- <eProf>0</eProf>
- <aLa>0</aLa>
- <aPa1>0</aPa1>
- <AscS4>0</AscS4>
- <aSer4>0</aSer4>
- <StkLoc>1</StkLoc>
- <TrcWin>0</TrcWin>
- <newCpu>0</newCpu>
- <uProt>0</uProt>
- </DebugFlag>
- <LintExecutable></LintExecutable>
- <LintConfigFile></LintConfigFile>
- <bLintAuto>0</bLintAuto>
- <bAutoGenD>0</bAutoGenD>
- <LntExFlags>0</LntExFlags>
- <pMisraName></pMisraName>
- <pszMrule></pszMrule>
- <pSingCmds></pSingCmds>
- <pMultCmds></pMultCmds>
- <pMisraNamep></pMisraNamep>
- <pszMrulep></pszMrulep>
- <pSingCmdsp></pSingCmdsp>
- <pMultCmdsp></pMultCmdsp>
- </TargetOption>
- </Target>
-
- <Group>
- <GroupName>Doc</GroupName>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <cbSel>0</cbSel>
- <RteFlg>0</RteFlg>
- <File>
- <GroupNumber>1</GroupNumber>
- <FileNumber>1</FileNumber>
- <FileType>5</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../readme.txt</PathWithFileName>
- <FilenameWithoutPath>readme.txt</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- </Group>
-
- <Group>
- <GroupName>Drivers/BSP/Components</GroupName>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <cbSel>0</cbSel>
- <RteFlg>0</RteFlg>
- <File>
- <GroupNumber>2</GroupNumber>
- <FileNumber>2</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/BSP/Components/ism330dhcx/ism330dhcx.c</PathWithFileName>
- <FilenameWithoutPath>ism330dhcx.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>2</GroupNumber>
- <FileNumber>3</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/BSP/Components/ism330dhcx/ism330dhcx_reg.c</PathWithFileName>
- <FilenameWithoutPath>ism330dhcx_reg.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>2</GroupNumber>
- <FileNumber>4</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/BSP/Components/s25fl128s/s25fl128s.c</PathWithFileName>
- <FilenameWithoutPath>s25fl128s.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>2</GroupNumber>
- <FileNumber>5</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/BSP/Components/ssd1315/ssd1315.c</PathWithFileName>
- <FilenameWithoutPath>ssd1315.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>2</GroupNumber>
- <FileNumber>6</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/BSP/Components/ssd1315/ssd1315_reg.c</PathWithFileName>
- <FilenameWithoutPath>ssd1315_reg.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>2</GroupNumber>
- <FileNumber>7</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/BSP/Components/stts22h/stts22h.c</PathWithFileName>
- <FilenameWithoutPath>stts22h.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>2</GroupNumber>
- <FileNumber>8</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/BSP/Components/stts22h/stts22h_reg.c</PathWithFileName>
- <FilenameWithoutPath>stts22h_reg.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- </Group>
-
- <Group>
- <GroupName>Drivers/BSP/STM32WB5MM-DK</GroupName>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <cbSel>0</cbSel>
- <RteFlg>0</RteFlg>
- <File>
- <GroupNumber>3</GroupNumber>
- <FileNumber>9</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk.c</PathWithFileName>
- <FilenameWithoutPath>stm32wb5mm_dk.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>3</GroupNumber>
- <FileNumber>10</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_audio.c</PathWithFileName>
- <FilenameWithoutPath>stm32wb5mm_dk_audio.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>3</GroupNumber>
- <FileNumber>11</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_bus.c</PathWithFileName>
- <FilenameWithoutPath>stm32wb5mm_dk_bus.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>3</GroupNumber>
- <FileNumber>12</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_env_sensors.c</PathWithFileName>
- <FilenameWithoutPath>stm32wb5mm_dk_env_sensors.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>3</GroupNumber>
- <FileNumber>13</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_env_sensors_ex.c</PathWithFileName>
- <FilenameWithoutPath>stm32wb5mm_dk_env_sensors_ex.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>3</GroupNumber>
- <FileNumber>14</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_lcd.c</PathWithFileName>
- <FilenameWithoutPath>stm32wb5mm_dk_lcd.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>3</GroupNumber>
- <FileNumber>15</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_motion_sensors.c</PathWithFileName>
- <FilenameWithoutPath>stm32wb5mm_dk_motion_sensors.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>3</GroupNumber>
- <FileNumber>16</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_motion_sensors_ex.c</PathWithFileName>
- <FilenameWithoutPath>stm32wb5mm_dk_motion_sensors_ex.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>3</GroupNumber>
- <FileNumber>17</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_qspi.c</PathWithFileName>
- <FilenameWithoutPath>stm32wb5mm_dk_qspi.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- </Group>
-
- <Group>
- <GroupName>Drivers/CMSIS</GroupName>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <cbSel>0</cbSel>
- <RteFlg>0</RteFlg>
- <File>
- <GroupNumber>4</GroupNumber>
- <FileNumber>18</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../Src/system_stm32wbxx.c</PathWithFileName>
- <FilenameWithoutPath>system_stm32wbxx.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- </Group>
-
- <Group>
- <GroupName>Drivers/CMSIS/DSP/Source/FilteringFunctions</GroupName>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <cbSel>0</cbSel>
- <RteFlg>0</RteFlg>
- <File>
- <GroupNumber>5</GroupNumber>
- <FileNumber>19</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_init_q15.c</PathWithFileName>
- <FilenameWithoutPath>arm_fir_decimate_init_q15.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>5</GroupNumber>
- <FileNumber>20</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_q15.c</PathWithFileName>
- <FilenameWithoutPath>arm_fir_decimate_q15.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- </Group>
-
- <Group>
- <GroupName>Drivers/STM32WBxx_HAL_Driver</GroupName>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <cbSel>0</cbSel>
- <RteFlg>0</RteFlg>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>21</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>22</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_cortex.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>23</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_dma.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>24</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_exti.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>25</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_flash.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>26</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_flash_ex.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>27</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_gpio.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>28</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_i2c.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>29</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_i2c_ex.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>30</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pcd.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_pcd.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>31</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pcd_ex.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_pcd_ex.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>32</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_pwr.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>33</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_pwr_ex.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>34</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_qspi.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_qspi.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>35</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_rcc.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>36</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_rcc_ex.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>37</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_sai.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_sai.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>38</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_sai_ex.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_sai_ex.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>39</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_spi.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_spi.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>40</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_tim.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_tim.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>41</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_tim_ex.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_tim_ex.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>42</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_uart.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_uart.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>43</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_uart_ex.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_hal_uart_ex.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>6</GroupNumber>
- <FileNumber>44</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_usb.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_ll_usb.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- </Group>
-
- <Group>
- <GroupName>Example/MDK-ARM</GroupName>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <cbSel>0</cbSel>
- <RteFlg>0</RteFlg>
- <File>
- <GroupNumber>7</GroupNumber>
- <FileNumber>45</FileNumber>
- <FileType>2</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>startup_stm32wb5mxx_cm4.s</PathWithFileName>
- <FilenameWithoutPath>startup_stm32wb5mxx_cm4.s</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- </Group>
-
- <Group>
- <GroupName>Example/User</GroupName>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <cbSel>0</cbSel>
- <RteFlg>0</RteFlg>
- <File>
- <GroupNumber>8</GroupNumber>
- <FileNumber>46</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../Src/lcd.c</PathWithFileName>
- <FilenameWithoutPath>lcd.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>8</GroupNumber>
- <FileNumber>47</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../Src/led.c</PathWithFileName>
- <FilenameWithoutPath>led.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>8</GroupNumber>
- <FileNumber>48</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../Src/main.c</PathWithFileName>
- <FilenameWithoutPath>main.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>8</GroupNumber>
- <FileNumber>49</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../Src/proximity.c</PathWithFileName>
- <FilenameWithoutPath>proximity.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>8</GroupNumber>
- <FileNumber>50</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../Src/qspi.c</PathWithFileName>
- <FilenameWithoutPath>qspi.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>8</GroupNumber>
- <FileNumber>51</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../Src/record.c</PathWithFileName>
- <FilenameWithoutPath>record.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>8</GroupNumber>
- <FileNumber>52</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../Src/sensors.c</PathWithFileName>
- <FilenameWithoutPath>sensors.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>8</GroupNumber>
- <FileNumber>53</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../Src/stm32wbxx_it.c</PathWithFileName>
- <FilenameWithoutPath>stm32wbxx_it.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- </Group>
-
- <Group>
- <GroupName>Example/User/usb</GroupName>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <cbSel>0</cbSel>
- <RteFlg>0</RteFlg>
- <File>
- <GroupNumber>9</GroupNumber>
- <FileNumber>54</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../Src/usb/usbd_audio_if.c</PathWithFileName>
- <FilenameWithoutPath>usbd_audio_if.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>9</GroupNumber>
- <FileNumber>55</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../Src/usb/usbd_audio_in.c</PathWithFileName>
- <FilenameWithoutPath>usbd_audio_in.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>9</GroupNumber>
- <FileNumber>56</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../Src/usb/usbd_conf.c</PathWithFileName>
- <FilenameWithoutPath>usbd_conf.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>9</GroupNumber>
- <FileNumber>57</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../Src/usb/usbd_desc.c</PathWithFileName>
- <FilenameWithoutPath>usbd_desc.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- </Group>
-
- <Group>
- <GroupName>Example/User/vl53l0x</GroupName>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <cbSel>0</cbSel>
- <RteFlg>0</RteFlg>
- <File>
- <GroupNumber>10</GroupNumber>
- <FileNumber>58</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../Src/vl53l0x/vl53l0x_api.c</PathWithFileName>
- <FilenameWithoutPath>vl53l0x_api.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>10</GroupNumber>
- <FileNumber>59</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../Src/vl53l0x/vl53l0x_api_calibration.c</PathWithFileName>
- <FilenameWithoutPath>vl53l0x_api_calibration.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>10</GroupNumber>
- <FileNumber>60</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../Src/vl53l0x/vl53l0x_api_core.c</PathWithFileName>
- <FilenameWithoutPath>vl53l0x_api_core.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>10</GroupNumber>
- <FileNumber>61</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../Src/vl53l0x/vl53l0x_api_ranging.c</PathWithFileName>
- <FilenameWithoutPath>vl53l0x_api_ranging.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>10</GroupNumber>
- <FileNumber>62</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../Src/vl53l0x/vl53l0x_api_strings.c</PathWithFileName>
- <FilenameWithoutPath>vl53l0x_api_strings.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>10</GroupNumber>
- <FileNumber>63</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../Src/vl53l0x/vl53l0x_platform_log.c</PathWithFileName>
- <FilenameWithoutPath>vl53l0x_platform_log.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>10</GroupNumber>
- <FileNumber>64</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../Src/vl53l0x/vl53l0x_tof.c</PathWithFileName>
- <FilenameWithoutPath>vl53l0x_tof.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- </Group>
-
- <Group>
- <GroupName>Middlewares/ST/STM32_Audio/PDM</GroupName>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <cbSel>0</cbSel>
- <RteFlg>0</RteFlg>
- <File>
- <GroupNumber>11</GroupNumber>
- <FileNumber>65</FileNumber>
- <FileType>4</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>..\..\..\..\..\Middlewares\ST\STM32_Audio\Addons\PDM\Lib\libPDMFilter_CM4_Keil_wc16.lib</PathWithFileName>
- <FilenameWithoutPath>libPDMFilter_CM4_Keil_wc16.lib</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- </Group>
-
- <Group>
- <GroupName>Middlewares/ST/STM32_USB_Device_Library/Core</GroupName>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <cbSel>0</cbSel>
- <RteFlg>0</RteFlg>
- <File>
- <GroupNumber>12</GroupNumber>
- <FileNumber>66</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c</PathWithFileName>
- <FilenameWithoutPath>usbd_core.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>12</GroupNumber>
- <FileNumber>67</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c</PathWithFileName>
- <FilenameWithoutPath>usbd_ctlreq.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- <File>
- <GroupNumber>12</GroupNumber>
- <FileNumber>68</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c</PathWithFileName>
- <FilenameWithoutPath>usbd_ioreq.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- </Group>
-
- <Group>
- <GroupName>Utilities</GroupName>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <cbSel>0</cbSel>
- <RteFlg>0</RteFlg>
- <File>
- <GroupNumber>13</GroupNumber>
- <FileNumber>69</FileNumber>
- <FileType>1</FileType>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <bDave2>0</bDave2>
- <PathWithFileName>../../../../../Utilities/LCD/stm32_lcd.c</PathWithFileName>
- <FilenameWithoutPath>stm32_lcd.c</FilenameWithoutPath>
- <RteFlg>0</RteFlg>
- <bShared>0</bShared>
- </File>
- </Group>
-
- <Group>
- <GroupName>::CMSIS</GroupName>
- <tvExp>0</tvExp>
- <tvExpOptDlg>0</tvExpOptDlg>
- <cbSel>0</cbSel>
- <RteFlg>1</RteFlg>
- </Group>
-
-</ProjectOpt>
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/MDK-ARM/Project.uvprojx b/Projects/STM32WB5MM-DK/Examples/BSP/MDK-ARM/Project.uvprojx
deleted file mode 100644
index 2eb6633a0..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/MDK-ARM/Project.uvprojx
+++ /dev/null
@@ -1,829 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
-<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_projx.xsd">
-
- <SchemaVersion>2.1</SchemaVersion>
-
- <Header>### uVision Project, (C) Keil Software</Header>
-
- <Targets>
- <Target>
- <TargetName>STM32WB5MM-DK</TargetName>
- <ToolsetNumber>0x4</ToolsetNumber>
- <ToolsetName>ARM-ADS</ToolsetName>
- <pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
- <uAC6>0</uAC6>
- <TargetOption>
- <TargetCommonOption>
- <Device>STM32WB5MMGHx</Device>
- <Vendor>STMicroelectronics</Vendor>
- <PackID>Keil.STM32WBxx_DFP.1.2.0</PackID>
- <PackURL>http://www.keil.com/pack/</PackURL>
- <Cpu>IRAM(0x20000000,0x00040000) IROM(0x08000000,0x00100000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ESEL ELITTLE</Cpu>
- <FlashUtilSpec></FlashUtilSpec>
- <StartupFile></StartupFile>
- <FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32WB5x_M4_1024 -FS08000000 -FL0100000 -FP0($$Device:STM32WB5MMGHx$CMSIS\Flash\STM32WB5x_M4_1024.FLM))</FlashDriverDll>
- <DeviceId>0</DeviceId>
- <RegisterFile>$$Device:STM32WB5MMGHx$Drivers\CMSIS\Device\ST\STM32WBxx\Include\stm32wbxx.h</RegisterFile>
- <MemoryEnv></MemoryEnv>
- <Cmp></Cmp>
- <Asm></Asm>
- <Linker></Linker>
- <OHString></OHString>
- <InfinionOptionDll></InfinionOptionDll>
- <SLE66CMisc></SLE66CMisc>
- <SLE66AMisc></SLE66AMisc>
- <SLE66LinkerMisc></SLE66LinkerMisc>
- <SFDFile>$$Device:STM32WB5MMGHx$CMSIS\SVD\STM32WB55_CM4.svd</SFDFile>
- <bCustSvd>0</bCustSvd>
- <UseEnv>0</UseEnv>
- <BinPath></BinPath>
- <IncludePath></IncludePath>
- <LibPath></LibPath>
- <RegisterFilePath></RegisterFilePath>
- <DBRegisterFilePath></DBRegisterFilePath>
- <TargetStatus>
- <Error>0</Error>
- <ExitCodeStop>0</ExitCodeStop>
- <ButtonStop>0</ButtonStop>
- <NotGenerated>0</NotGenerated>
- <InvalidFlash>1</InvalidFlash>
- </TargetStatus>
- <OutputDirectory>STM32WB5MM-DK\Exe\</OutputDirectory>
- <OutputName>RCC_ClockConfig</OutputName>
- <CreateExecutable>1</CreateExecutable>
- <CreateLib>0</CreateLib>
- <CreateHexFile>1</CreateHexFile>
- <DebugInformation>1</DebugInformation>
- <BrowseInformation>1</BrowseInformation>
- <ListingPath></ListingPath>
- <HexFormatSelection>1</HexFormatSelection>
- <Merge32K>0</Merge32K>
- <CreateBatchFile>0</CreateBatchFile>
- <BeforeCompile>
- <RunUserProg1>0</RunUserProg1>
- <RunUserProg2>0</RunUserProg2>
- <UserProg1Name></UserProg1Name>
- <UserProg2Name></UserProg2Name>
- <UserProg1Dos16Mode>0</UserProg1Dos16Mode>
- <UserProg2Dos16Mode>0</UserProg2Dos16Mode>
- <nStopU1X>0</nStopU1X>
- <nStopU2X>0</nStopU2X>
- </BeforeCompile>
- <BeforeMake>
- <RunUserProg1>0</RunUserProg1>
- <RunUserProg2>0</RunUserProg2>
- <UserProg1Name></UserProg1Name>
- <UserProg2Name></UserProg2Name>
- <UserProg1Dos16Mode>0</UserProg1Dos16Mode>
- <UserProg2Dos16Mode>0</UserProg2Dos16Mode>
- <nStopB1X>0</nStopB1X>
- <nStopB2X>0</nStopB2X>
- </BeforeMake>
- <AfterMake>
- <RunUserProg1>0</RunUserProg1>
- <RunUserProg2>0</RunUserProg2>
- <UserProg1Name></UserProg1Name>
- <UserProg2Name></UserProg2Name>
- <UserProg1Dos16Mode>0</UserProg1Dos16Mode>
- <UserProg2Dos16Mode>0</UserProg2Dos16Mode>
- <nStopA1X>0</nStopA1X>
- <nStopA2X>0</nStopA2X>
- </AfterMake>
- <SelectedForBatchBuild>1</SelectedForBatchBuild>
- <SVCSIdString></SVCSIdString>
- </TargetCommonOption>
- <CommonProperty>
- <UseCPPCompiler>0</UseCPPCompiler>
- <RVCTCodeConst>0</RVCTCodeConst>
- <RVCTZI>0</RVCTZI>
- <RVCTOtherData>0</RVCTOtherData>
- <ModuleSelection>0</ModuleSelection>
- <IncludeInBuild>1</IncludeInBuild>
- <AlwaysBuild>0</AlwaysBuild>
- <GenerateAssemblyFile>0</GenerateAssemblyFile>
- <AssembleAssemblyFile>0</AssembleAssemblyFile>
- <PublicsOnly>0</PublicsOnly>
- <StopOnExitCode>3</StopOnExitCode>
- <CustomArgument></CustomArgument>
- <IncludeLibraryModules></IncludeLibraryModules>
- <ComprImg>0</ComprImg>
- </CommonProperty>
- <DllOption>
- <SimDllName>SARMCM3.DLL</SimDllName>
- <SimDllArguments> -REMAP -MPU</SimDllArguments>
- <SimDlgDll>DCM.DLL</SimDlgDll>
- <SimDlgDllArguments>-pCM4</SimDlgDllArguments>
- <TargetDllName>SARMCM3.DLL</TargetDllName>
- <TargetDllArguments> -MPU</TargetDllArguments>
- <TargetDlgDll>TCM.DLL</TargetDlgDll>
- <TargetDlgDllArguments>-pCM4</TargetDlgDllArguments>
- </DllOption>
- <DebugOption>
- <OPTHX>
- <HexSelection>1</HexSelection>
- <HexRangeLowAddress>0</HexRangeLowAddress>
- <HexRangeHighAddress>0</HexRangeHighAddress>
- <HexOffset>0</HexOffset>
- <Oh166RecLen>16</Oh166RecLen>
- </OPTHX>
- </DebugOption>
- <Utilities>
- <Flash1>
- <UseTargetDll>1</UseTargetDll>
- <UseExternalTool>0</UseExternalTool>
- <RunIndependent>0</RunIndependent>
- <UpdateFlashBeforeDebugging>1</UpdateFlashBeforeDebugging>
- <Capability>1</Capability>
- <DriverSelection>4096</DriverSelection>
- </Flash1>
- <bUseTDR>1</bUseTDR>
- <Flash2>BIN\UL2CM3.DLL</Flash2>
- <Flash3>"" ()</Flash3>
- <Flash4></Flash4>
- <pFcarmOut></pFcarmOut>
- <pFcarmGrp></pFcarmGrp>
- <pFcArmRoot></pFcArmRoot>
- <FcArmLst>0</FcArmLst>
- </Utilities>
- <TargetArmAds>
- <ArmAdsMisc>
- <GenerateListings>0</GenerateListings>
- <asHll>1</asHll>
- <asAsm>1</asAsm>
- <asMacX>1</asMacX>
- <asSyms>1</asSyms>
- <asFals>1</asFals>
- <asDbgD>1</asDbgD>
- <asForm>1</asForm>
- <ldLst>0</ldLst>
- <ldmm>1</ldmm>
- <ldXref>1</ldXref>
- <BigEnd>0</BigEnd>
- <AdsALst>1</AdsALst>
- <AdsACrf>1</AdsACrf>
- <AdsANop>0</AdsANop>
- <AdsANot>0</AdsANot>
- <AdsLLst>1</AdsLLst>
- <AdsLmap>1</AdsLmap>
- <AdsLcgr>1</AdsLcgr>
- <AdsLsym>1</AdsLsym>
- <AdsLszi>1</AdsLszi>
- <AdsLtoi>1</AdsLtoi>
- <AdsLsun>1</AdsLsun>
- <AdsLven>1</AdsLven>
- <AdsLsxf>1</AdsLsxf>
- <RvctClst>0</RvctClst>
- <GenPPlst>0</GenPPlst>
- <AdsCpuType>"Cortex-M4"</AdsCpuType>
- <RvctDeviceName></RvctDeviceName>
- <mOS>0</mOS>
- <uocRom>0</uocRom>
- <uocRam>0</uocRam>
- <hadIROM>1</hadIROM>
- <hadIRAM>1</hadIRAM>
- <hadXRAM>0</hadXRAM>
- <uocXRam>0</uocXRam>
- <RvdsVP>2</RvdsVP>
- <RvdsMve>0</RvdsMve>
- <RvdsCdeCp>0</RvdsCdeCp>
- <hadIRAM2>0</hadIRAM2>
- <hadIROM2>0</hadIROM2>
- <StupSel>8</StupSel>
- <useUlib>1</useUlib>
- <EndSel>1</EndSel>
- <uLtcg>0</uLtcg>
- <nSecure>0</nSecure>
- <RoSelD>3</RoSelD>
- <RwSelD>3</RwSelD>
- <CodeSel>0</CodeSel>
- <OptFeed>0</OptFeed>
- <NoZi1>0</NoZi1>
- <NoZi2>0</NoZi2>
- <NoZi3>0</NoZi3>
- <NoZi4>0</NoZi4>
- <NoZi5>0</NoZi5>
- <Ro1Chk>0</Ro1Chk>
- <Ro2Chk>0</Ro2Chk>
- <Ro3Chk>0</Ro3Chk>
- <Ir1Chk>1</Ir1Chk>
- <Ir2Chk>0</Ir2Chk>
- <Ra1Chk>0</Ra1Chk>
- <Ra2Chk>0</Ra2Chk>
- <Ra3Chk>0</Ra3Chk>
- <Im1Chk>1</Im1Chk>
- <Im2Chk>0</Im2Chk>
- <OnChipMemories>
- <Ocm1>
- <Type>0</Type>
- <StartAddress>0x0</StartAddress>
- <Size>0x0</Size>
- </Ocm1>
- <Ocm2>
- <Type>0</Type>
- <StartAddress>0x0</StartAddress>
- <Size>0x0</Size>
- </Ocm2>
- <Ocm3>
- <Type>0</Type>
- <StartAddress>0x0</StartAddress>
- <Size>0x0</Size>
- </Ocm3>
- <Ocm4>
- <Type>0</Type>
- <StartAddress>0x0</StartAddress>
- <Size>0x0</Size>
- </Ocm4>
- <Ocm5>
- <Type>0</Type>
- <StartAddress>0x0</StartAddress>
- <Size>0x0</Size>
- </Ocm5>
- <Ocm6>
- <Type>0</Type>
- <StartAddress>0x0</StartAddress>
- <Size>0x0</Size>
- </Ocm6>
- <IRAM>
- <Type>0</Type>
- <StartAddress>0x20000000</StartAddress>
- <Size>0x40000</Size>
- </IRAM>
- <IROM>
- <Type>1</Type>
- <StartAddress>0x8000000</StartAddress>
- <Size>0x100000</Size>
- </IROM>
- <XRAM>
- <Type>0</Type>
- <StartAddress>0x0</StartAddress>
- <Size>0x0</Size>
- </XRAM>
- <OCR_RVCT1>
- <Type>1</Type>
- <StartAddress>0x0</StartAddress>
- <Size>0x0</Size>
- </OCR_RVCT1>
- <OCR_RVCT2>
- <Type>1</Type>
- <StartAddress>0x0</StartAddress>
- <Size>0x0</Size>
- </OCR_RVCT2>
- <OCR_RVCT3>
- <Type>1</Type>
- <StartAddress>0x0</StartAddress>
- <Size>0x0</Size>
- </OCR_RVCT3>
- <OCR_RVCT4>
- <Type>1</Type>
- <StartAddress>0x8000000</StartAddress>
- <Size>0x100000</Size>
- </OCR_RVCT4>
- <OCR_RVCT5>
- <Type>1</Type>
- <StartAddress>0x0</StartAddress>
- <Size>0x0</Size>
- </OCR_RVCT5>
- <OCR_RVCT6>
- <Type>0</Type>
- <StartAddress>0x0</StartAddress>
- <Size>0x0</Size>
- </OCR_RVCT6>
- <OCR_RVCT7>
- <Type>0</Type>
- <StartAddress>0x0</StartAddress>
- <Size>0x0</Size>
- </OCR_RVCT7>
- <OCR_RVCT8>
- <Type>0</Type>
- <StartAddress>0x0</StartAddress>
- <Size>0x0</Size>
- </OCR_RVCT8>
- <OCR_RVCT9>
- <Type>0</Type>
- <StartAddress>0x20000000</StartAddress>
- <Size>0x40000</Size>
- </OCR_RVCT9>
- <OCR_RVCT10>
- <Type>0</Type>
- <StartAddress>0x0</StartAddress>
- <Size>0x0</Size>
- </OCR_RVCT10>
- </OnChipMemories>
- <RvctStartVector></RvctStartVector>
- </ArmAdsMisc>
- <Cads>
- <interw>1</interw>
- <Optim>4</Optim>
- <oTime>0</oTime>
- <SplitLS>0</SplitLS>
- <OneElfS>1</OneElfS>
- <Strict>0</Strict>
- <EnumInt>0</EnumInt>
- <PlainCh>0</PlainCh>
- <Ropi>0</Ropi>
- <Rwpi>0</Rwpi>
- <wLevel>2</wLevel>
- <uThumb>0</uThumb>
- <uSurpInc>0</uSurpInc>
- <uC99>1</uC99>
- <uGnu>0</uGnu>
- <useXO>0</useXO>
- <v6Lang>5</v6Lang>
- <v6LangP>3</v6LangP>
- <vShortEn>1</vShortEn>
- <vShortWch>1</vShortWch>
- <v6Lto>0</v6Lto>
- <v6WtE>0</v6WtE>
- <v6Rtti>0</v6Rtti>
- <VariousControls>
- <MiscControls></MiscControls>
- <Define>STM32WB5Mxx,STM32WB55xx,USE_HAL_DRIVER,USE_STM32WB5M_DK,CORE_CM4,ARM_MATH_CM4,USE_USB_FS</Define>
- <Undefine></Undefine>
- <IncludePath>../Inc;../Src/vl53l0x;../../../../../Drivers/CMSIS/Include;../../../../../Drivers/CMSIS/Device/ST/STM32WBxx/Include;../../../../../Drivers/STM32WBxx_HAL_Driver/Inc;../../../../../Drivers/BSP/STM32WB5MM-DK;../../../../../Drivers/BSP/Components/Common;../../../../../Drivers/BSP/Components/ism330dhcx;../../../../../Drivers/BSP/Components/s25fl128s;../../../../../Utilities/LCD;../../../../../Middlewares/ST/STM32_Audio/Addons/PDM/Inc;../Inc/usb;../../../../../Middlewares/ST/STM32_USB_Device_Library/Core/Inc;../../../../../Drivers/CMSIS/DSP/Source/FilteringFunctions;../../../../../Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc;../../../../../Drivers/CMSIS/DSP/Include;../../../../../Drivers/BSP/Components/stts22h</IncludePath>
- </VariousControls>
- </Cads>
- <Aads>
- <interw>1</interw>
- <Ropi>0</Ropi>
- <Rwpi>0</Rwpi>
- <thumb>0</thumb>
- <SplitLS>0</SplitLS>
- <SwStkChk>0</SwStkChk>
- <NoWarn>0</NoWarn>
- <uSurpInc>0</uSurpInc>
- <useXO>0</useXO>
- <ClangAsOpt>4</ClangAsOpt>
- <VariousControls>
- <MiscControls></MiscControls>
- <Define></Define>
- <Undefine></Undefine>
- <IncludePath></IncludePath>
- </VariousControls>
- </Aads>
- <LDads>
- <umfTarg>0</umfTarg>
- <Ropi>0</Ropi>
- <Rwpi>0</Rwpi>
- <noStLib>0</noStLib>
- <RepFail>1</RepFail>
- <useFile>0</useFile>
- <TextAddressRange></TextAddressRange>
- <DataAddressRange></DataAddressRange>
- <pXoBase></pXoBase>
- <ScatterFile>stm32wb5mxx_flash_cm4.sct</ScatterFile>
- <IncludeLibs></IncludeLibs>
- <IncludeLibsPath></IncludeLibsPath>
- <Misc>--diag_suppress L6314W
---diag_suppress 1296</Misc>
- <LinkerInputFile></LinkerInputFile>
- <DisabledWarnings></DisabledWarnings>
- </LDads>
- </TargetArmAds>
- </TargetOption>
- <Groups>
- <Group>
- <GroupName>Doc</GroupName>
- <Files>
- <File>
- <FileName>readme.txt</FileName>
- <FileType>5</FileType>
- <FilePath>../readme.txt</FilePath>
- </File>
- </Files>
- </Group>
- <Group>
- <GroupName>Drivers/BSP/Components</GroupName>
- <Files>
- <File>
- <FileName>ism330dhcx.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/BSP/Components/ism330dhcx/ism330dhcx.c</FilePath>
- </File>
- <File>
- <FileName>ism330dhcx_reg.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/BSP/Components/ism330dhcx/ism330dhcx_reg.c</FilePath>
- </File>
- <File>
- <FileName>s25fl128s.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/BSP/Components/s25fl128s/s25fl128s.c</FilePath>
- </File>
- <File>
- <FileName>ssd1315.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/BSP/Components/ssd1315/ssd1315.c</FilePath>
- </File>
- <File>
- <FileName>ssd1315_reg.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/BSP/Components/ssd1315/ssd1315_reg.c</FilePath>
- </File>
- <File>
- <FileName>stts22h.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/BSP/Components/stts22h/stts22h.c</FilePath>
- </File>
- <File>
- <FileName>stts22h_reg.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/BSP/Components/stts22h/stts22h_reg.c</FilePath>
- </File>
- </Files>
- </Group>
- <Group>
- <GroupName>Drivers/BSP/STM32WB5MM-DK</GroupName>
- <Files>
- <File>
- <FileName>stm32wb5mm_dk.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk.c</FilePath>
- </File>
- <File>
- <FileName>stm32wb5mm_dk_audio.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_audio.c</FilePath>
- </File>
- <File>
- <FileName>stm32wb5mm_dk_bus.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_bus.c</FilePath>
- </File>
- <File>
- <FileName>stm32wb5mm_dk_env_sensors.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_env_sensors.c</FilePath>
- </File>
- <File>
- <FileName>stm32wb5mm_dk_env_sensors_ex.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_env_sensors_ex.c</FilePath>
- </File>
- <File>
- <FileName>stm32wb5mm_dk_lcd.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_lcd.c</FilePath>
- </File>
- <File>
- <FileName>stm32wb5mm_dk_motion_sensors.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_motion_sensors.c</FilePath>
- </File>
- <File>
- <FileName>stm32wb5mm_dk_motion_sensors_ex.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_motion_sensors_ex.c</FilePath>
- </File>
- <File>
- <FileName>stm32wb5mm_dk_qspi.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_qspi.c</FilePath>
- </File>
- </Files>
- </Group>
- <Group>
- <GroupName>Drivers/CMSIS</GroupName>
- <Files>
- <File>
- <FileName>system_stm32wbxx.c</FileName>
- <FileType>1</FileType>
- <FilePath>../Src/system_stm32wbxx.c</FilePath>
- </File>
- </Files>
- </Group>
- <Group>
- <GroupName>Drivers/CMSIS/DSP/Source/FilteringFunctions</GroupName>
- <Files>
- <File>
- <FileName>arm_fir_decimate_init_q15.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_init_q15.c</FilePath>
- </File>
- <File>
- <FileName>arm_fir_decimate_q15.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_q15.c</FilePath>
- </File>
- </Files>
- </Group>
- <Group>
- <GroupName>Drivers/STM32WBxx_HAL_Driver</GroupName>
- <Files>
- <File>
- <FileName>stm32wbxx_hal.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_cortex.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_dma.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_exti.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_flash.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_flash_ex.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_gpio.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_i2c.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_i2c_ex.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_pcd.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pcd.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_pcd_ex.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pcd_ex.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_pwr.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_pwr_ex.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_qspi.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_qspi.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_rcc.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_rcc_ex.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_sai.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_sai.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_sai_ex.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_sai_ex.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_spi.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_spi.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_tim.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_tim.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_tim_ex.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_tim_ex.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_uart.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_uart.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_hal_uart_ex.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_uart_ex.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_ll_usb.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_usb.c</FilePath>
- </File>
- </Files>
- </Group>
- <Group>
- <GroupName>Example/MDK-ARM</GroupName>
- <Files>
- <File>
- <FileName>startup_stm32wb5mxx_cm4.s</FileName>
- <FileType>2</FileType>
- <FilePath>startup_stm32wb5mxx_cm4.s</FilePath>
- </File>
- </Files>
- </Group>
- <Group>
- <GroupName>Example/User</GroupName>
- <Files>
- <File>
- <FileName>lcd.c</FileName>
- <FileType>1</FileType>
- <FilePath>../Src/lcd.c</FilePath>
- </File>
- <File>
- <FileName>led.c</FileName>
- <FileType>1</FileType>
- <FilePath>../Src/led.c</FilePath>
- </File>
- <File>
- <FileName>main.c</FileName>
- <FileType>1</FileType>
- <FilePath>../Src/main.c</FilePath>
- </File>
- <File>
- <FileName>proximity.c</FileName>
- <FileType>1</FileType>
- <FilePath>../Src/proximity.c</FilePath>
- </File>
- <File>
- <FileName>qspi.c</FileName>
- <FileType>1</FileType>
- <FilePath>../Src/qspi.c</FilePath>
- </File>
- <File>
- <FileName>record.c</FileName>
- <FileType>1</FileType>
- <FilePath>../Src/record.c</FilePath>
- </File>
- <File>
- <FileName>sensors.c</FileName>
- <FileType>1</FileType>
- <FilePath>../Src/sensors.c</FilePath>
- </File>
- <File>
- <FileName>stm32wbxx_it.c</FileName>
- <FileType>1</FileType>
- <FilePath>../Src/stm32wbxx_it.c</FilePath>
- </File>
- </Files>
- </Group>
- <Group>
- <GroupName>Example/User/usb</GroupName>
- <Files>
- <File>
- <FileName>usbd_audio_if.c</FileName>
- <FileType>1</FileType>
- <FilePath>../Src/usb/usbd_audio_if.c</FilePath>
- </File>
- <File>
- <FileName>usbd_audio_in.c</FileName>
- <FileType>1</FileType>
- <FilePath>../Src/usb/usbd_audio_in.c</FilePath>
- </File>
- <File>
- <FileName>usbd_conf.c</FileName>
- <FileType>1</FileType>
- <FilePath>../Src/usb/usbd_conf.c</FilePath>
- </File>
- <File>
- <FileName>usbd_desc.c</FileName>
- <FileType>1</FileType>
- <FilePath>../Src/usb/usbd_desc.c</FilePath>
- </File>
- </Files>
- </Group>
- <Group>
- <GroupName>Example/User/vl53l0x</GroupName>
- <Files>
- <File>
- <FileName>vl53l0x_api.c</FileName>
- <FileType>1</FileType>
- <FilePath>../Src/vl53l0x/vl53l0x_api.c</FilePath>
- </File>
- <File>
- <FileName>vl53l0x_api_calibration.c</FileName>
- <FileType>1</FileType>
- <FilePath>../Src/vl53l0x/vl53l0x_api_calibration.c</FilePath>
- </File>
- <File>
- <FileName>vl53l0x_api_core.c</FileName>
- <FileType>1</FileType>
- <FilePath>../Src/vl53l0x/vl53l0x_api_core.c</FilePath>
- </File>
- <File>
- <FileName>vl53l0x_api_ranging.c</FileName>
- <FileType>1</FileType>
- <FilePath>../Src/vl53l0x/vl53l0x_api_ranging.c</FilePath>
- </File>
- <File>
- <FileName>vl53l0x_api_strings.c</FileName>
- <FileType>1</FileType>
- <FilePath>../Src/vl53l0x/vl53l0x_api_strings.c</FilePath>
- </File>
- <File>
- <FileName>vl53l0x_platform_log.c</FileName>
- <FileType>1</FileType>
- <FilePath>../Src/vl53l0x/vl53l0x_platform_log.c</FilePath>
- </File>
- <File>
- <FileName>vl53l0x_tof.c</FileName>
- <FileType>1</FileType>
- <FilePath>../Src/vl53l0x/vl53l0x_tof.c</FilePath>
- </File>
- </Files>
- </Group>
- <Group>
- <GroupName>Middlewares/ST/STM32_Audio/PDM</GroupName>
- <Files>
- <File>
- <FileName>libPDMFilter_CM4_Keil_wc16.lib</FileName>
- <FileType>4</FileType>
- <FilePath>..\..\..\..\..\Middlewares\ST\STM32_Audio\Addons\PDM\Lib\libPDMFilter_CM4_Keil_wc16.lib</FilePath>
- </File>
- </Files>
- </Group>
- <Group>
- <GroupName>Middlewares/ST/STM32_USB_Device_Library/Core</GroupName>
- <Files>
- <File>
- <FileName>usbd_core.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c</FilePath>
- </File>
- <File>
- <FileName>usbd_ctlreq.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c</FilePath>
- </File>
- <File>
- <FileName>usbd_ioreq.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c</FilePath>
- </File>
- </Files>
- </Group>
- <Group>
- <GroupName>Utilities</GroupName>
- <Files>
- <File>
- <FileName>stm32_lcd.c</FileName>
- <FileType>1</FileType>
- <FilePath>../../../../../Utilities/LCD/stm32_lcd.c</FilePath>
- </File>
- </Files>
- </Group>
- <Group>
- <GroupName>::CMSIS</GroupName>
- </Group>
- </Groups>
- </Target>
- </Targets>
-
- <RTE>
- <apis/>
- <components>
- <component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="5.4.0" condition="ARMv6_7_8-M Device">
- <package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.7.0"/>
- <targetInfos>
- <targetInfo name="STM32WB5MM-DK"/>
- </targetInfos>
- </component>
- </components>
- <files/>
- </RTE>
-
- <LayerInfo>
- <Layers>
- <Layer>
- <LayName>&lt;Project Info&gt;</LayName>
- <LayDesc></LayDesc>
- <LayUrl></LayUrl>
- <LayKeys></LayKeys>
- <LayCat></LayCat>
- <LayLic></LayLic>
- <LayTarg>0</LayTarg>
- <LayPrjMark>1</LayPrjMark>
- </Layer>
- </Layers>
- </LayerInfo>
-
-</Project>
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/MDK-ARM/startup_stm32wb5mxx_cm4.s b/Projects/STM32WB5MM-DK/Examples/BSP/MDK-ARM/startup_stm32wb5mxx_cm4.s
deleted file mode 100644
index 6a51d2123..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/MDK-ARM/startup_stm32wb5mxx_cm4.s
+++ /dev/null
@@ -1,367 +0,0 @@
-;******************************************************************************
-;* File Name : startup_stm32wb5mxx_cm4.s
-;* Author : MCD Application Team
-;* Description : STM32WB5Mxx devices vector table for MDK-ARM toolchain.
-;* This module performs:
-;* - Set the initial SP
-;* - Set the initial PC == Reset_Handler
-;* - Set the vector table entries with the exceptions ISR address
-;* - Branches to __main in the C library (which eventually
-;* calls main()).
-;* After Reset the CortexM4 processor is in Thread mode,
-;* priority is Privileged, and the Stack is set to Main.
-;* <<< Use Configuration Wizard in Context Menu >>>
-;******************************************************************************
-;* @attention
-;*
-;* Copyright (c) 2019 STMicroelectronics.
-;* All rights reserved.
-;*
-;* This software is licensed under terms that can be found in the LICENSE file
-;* in the root directory of this software component.
-;* If no LICENSE file comes with this software, it is provided AS-IS.
-;*
-;******************************************************************************
-
-; Amount of memory (in bytes) allocated for Stack
-; Tailor this value to your application needs
-; <h> Stack Configuration
-; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
-; </h>
-
-Stack_Size EQU 0x1000
-
- AREA STACK, NOINIT, READWRITE, ALIGN=3
-Stack_Mem SPACE Stack_Size
-__initial_sp
-
-
-; <h> Heap Configuration
-; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
-; </h>
-
-Heap_Size EQU 0x400
-
- AREA HEAP, NOINIT, READWRITE, ALIGN=3
-__heap_base
-Heap_Mem SPACE Heap_Size
-__heap_limit
-
- PRESERVE8
- THUMB
-
-
-; Vector Table Mapped to Address 0 at Reset
- AREA RESET, DATA, READONLY
- EXPORT __Vectors
- EXPORT __Vectors_End
- EXPORT __Vectors_Size
-
-__Vectors DCD __initial_sp ; Top of Stack
- DCD Reset_Handler ; Reset Handler
- DCD NMI_Handler ; NMI Handler
- DCD HardFault_Handler ; Hard Fault Handler
- DCD MemManage_Handler ; MPU Fault Handler
- DCD BusFault_Handler ; Bus Fault Handler
- DCD UsageFault_Handler ; Usage Fault Handler
- DCD 0 ; Reserved
- DCD 0 ; Reserved
- DCD 0 ; Reserved
- DCD 0 ; Reserved
- DCD SVC_Handler ; SVCall Handler
- DCD DebugMon_Handler ; Debug Monitor Handler
- DCD 0 ; Reserved
- DCD PendSV_Handler ; PendSV Handler
- DCD SysTick_Handler ; SysTick Handler
-
- ; External Interrupts
- DCD WWDG_IRQHandler ; Window WatchDog
- DCD PVD_PVM_IRQHandler ; PVD and PVM detector
- DCD TAMP_STAMP_LSECSS_IRQHandler ; RTC Tamper and TimeStamp Interrupts and LSECSS Interrupts
- DCD RTC_WKUP_IRQHandler ; RTC Wakeup Interrupt
- DCD FLASH_IRQHandler ; FLASH global Interrupt
- DCD RCC_IRQHandler ; RCC Interrupt
- DCD EXTI0_IRQHandler ; EXTI Line 0 Interrupt
- DCD EXTI1_IRQHandler ; EXTI Line 1 Interrupt
- DCD EXTI2_IRQHandler ; EXTI Line 2 Interrupt
- DCD EXTI3_IRQHandler ; EXTI Line 3 Interrupt
- DCD EXTI4_IRQHandler ; EXTI Line 4 Interrupt
- DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1 Interrupt
- DCD DMA1_Channel2_IRQHandler ; DMA1 Channel 2 Interrupt
- DCD DMA1_Channel3_IRQHandler ; DMA1 Channel 3 Interrupt
- DCD DMA1_Channel4_IRQHandler ; DMA1 Channel 4 Interrupt
- DCD DMA1_Channel5_IRQHandler ; DMA1 Channel 5 Interrupt
- DCD DMA1_Channel6_IRQHandler ; DMA1 Channel 6 Interrupt
- DCD DMA1_Channel7_IRQHandler ; DMA1 Channel 7 Interrupt
- DCD ADC1_IRQHandler ; ADC1 Interrupt
- DCD USB_HP_IRQHandler ; USB High Priority Interrupt
- DCD USB_LP_IRQHandler ; USB Low Priority Interrupt
- DCD C2SEV_PWR_C2H_IRQHandler ; CPU M0+ SEV Interrupt
- DCD COMP_IRQHandler ; COMP1 and COMP2 Interrupts
- DCD EXTI9_5_IRQHandler ; EXTI Lines [9:5] Interrupt
- DCD TIM1_BRK_IRQHandler ; TIM1 Break Interrupt
- DCD TIM1_UP_TIM16_IRQHandler ; TIM1 Update and TIM16 global Interrupts
- DCD TIM1_TRG_COM_TIM17_IRQHandler ; TIM1 Trigger and Communication and TIM17 global Interrupts
- DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare Interrupt
- DCD TIM2_IRQHandler ; TIM2 Global Interrupt
- DCD PKA_IRQHandler ; PKA Interrupt
- DCD I2C1_EV_IRQHandler ; I2C1 Event Interrupt
- DCD I2C1_ER_IRQHandler ; I2C1 Error Interrupt
- DCD I2C3_EV_IRQHandler ; I2C3 Event Interrupt
- DCD I2C3_ER_IRQHandler ; I2C3 Error Interrupt
- DCD SPI1_IRQHandler ; SPI1 Interrupt
- DCD SPI2_IRQHandler ; SPI2 Interrupt
- DCD USART1_IRQHandler ; USART1 Interrupt
- DCD LPUART1_IRQHandler ; LPUART1 Interrupt
- DCD SAI1_IRQHandler ; SAI Interrupt
- DCD TSC_IRQHandler ; TSC Interrupt
- DCD EXTI15_10_IRQHandler ; EXTI Lines1[15:10 ]Interrupts
- DCD RTC_Alarm_IRQHandler ; RTC Alarms (A and B) Interrupt
- DCD CRS_IRQHandler ; CRS interrupt
- DCD PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler ; WKUP Interrupt from PWR
- DCD IPCC_C1_RX_IRQHandler ; IPCC CPU1 RX occupied interrupt
- DCD IPCC_C1_TX_IRQHandler ; IPCC CPU1 RX free interrupt
- DCD HSEM_IRQHandler ; HSEM0 Interrupt
- DCD LPTIM1_IRQHandler ; LPTIM1 Interrupt
- DCD LPTIM2_IRQHandler ; LPTIM2 Interrupt
- DCD LCD_IRQHandler ; LCD Interrupt
- DCD QUADSPI_IRQHandler ; QUADSPI Interrupt
- DCD AES1_IRQHandler ; AES1 Interrupt
- DCD AES2_IRQHandler ; AES2 Interrupt
- DCD RNG_IRQHandler ; RNG1 Interrupt
- DCD FPU_IRQHandler ; FPU Interrupt
- DCD DMA2_Channel1_IRQHandler ; DMA2 Channel 1 Interrupt
- DCD DMA2_Channel2_IRQHandler ; DMA2 Channel 2 Interrupt
- DCD DMA2_Channel3_IRQHandler ; DMA2 Channel 3 Interrupt
- DCD DMA2_Channel4_IRQHandler ; DMA2 Channel 4 Interrupt
- DCD DMA2_Channel5_IRQHandler ; DMA2 Channel 5 Interrupt
- DCD DMA2_Channel6_IRQHandler ; DMA2 Channel 6 Interrupt
- DCD DMA2_Channel7_IRQHandler ; DMA2 Channel 7 Interrupt
- DCD DMAMUX1_OVR_IRQHandler ; DMAMUX overrun Interrupt
-
-__Vectors_End
-
-__Vectors_Size EQU __Vectors_End - __Vectors
-
- AREA |.text|, CODE, READONLY
-
-; Reset handler
-Reset_Handler PROC
- EXPORT Reset_Handler [WEAK]
- IMPORT SystemInit
- IMPORT __main
-
- LDR R0, =SystemInit
- BLX R0
- LDR R0, =__main
- BX R0
- ENDP
-
-; Dummy Exception Handlers (infinite loops which can be modified)
-
-NMI_Handler PROC
- EXPORT NMI_Handler [WEAK]
- B .
- ENDP
-HardFault_Handler\
- PROC
- EXPORT HardFault_Handler [WEAK]
- B .
- ENDP
-MemManage_Handler\
- PROC
- EXPORT MemManage_Handler [WEAK]
- B .
- ENDP
-BusFault_Handler\
- PROC
- EXPORT BusFault_Handler [WEAK]
- B .
- ENDP
-UsageFault_Handler\
- PROC
- EXPORT UsageFault_Handler [WEAK]
- B .
- ENDP
-SVC_Handler PROC
- EXPORT SVC_Handler [WEAK]
- B .
- ENDP
-DebugMon_Handler\
- PROC
- EXPORT DebugMon_Handler [WEAK]
- B .
- ENDP
-PendSV_Handler PROC
- EXPORT PendSV_Handler [WEAK]
- B .
- ENDP
-SysTick_Handler PROC
- EXPORT SysTick_Handler [WEAK]
- B .
- ENDP
-
-Default_Handler PROC
-
- EXPORT WWDG_IRQHandler [WEAK]
- EXPORT PVD_PVM_IRQHandler [WEAK]
- EXPORT TAMP_STAMP_LSECSS_IRQHandler [WEAK]
- EXPORT RTC_WKUP_IRQHandler [WEAK]
- EXPORT FLASH_IRQHandler [WEAK]
- EXPORT RCC_IRQHandler [WEAK]
- EXPORT EXTI0_IRQHandler [WEAK]
- EXPORT EXTI1_IRQHandler [WEAK]
- EXPORT EXTI2_IRQHandler [WEAK]
- EXPORT EXTI3_IRQHandler [WEAK]
- EXPORT EXTI4_IRQHandler [WEAK]
- EXPORT DMA1_Channel1_IRQHandler [WEAK]
- EXPORT DMA1_Channel2_IRQHandler [WEAK]
- EXPORT DMA1_Channel3_IRQHandler [WEAK]
- EXPORT DMA1_Channel4_IRQHandler [WEAK]
- EXPORT DMA1_Channel5_IRQHandler [WEAK]
- EXPORT DMA1_Channel6_IRQHandler [WEAK]
- EXPORT DMA1_Channel7_IRQHandler [WEAK]
- EXPORT ADC1_IRQHandler [WEAK]
- EXPORT USB_HP_IRQHandler [WEAK]
- EXPORT USB_LP_IRQHandler [WEAK]
- EXPORT C2SEV_PWR_C2H_IRQHandler [WEAK]
- EXPORT COMP_IRQHandler [WEAK]
- EXPORT EXTI9_5_IRQHandler [WEAK]
- EXPORT TIM1_BRK_IRQHandler [WEAK]
- EXPORT TIM1_UP_TIM16_IRQHandler [WEAK]
- EXPORT TIM1_TRG_COM_TIM17_IRQHandler [WEAK]
- EXPORT TIM1_CC_IRQHandler [WEAK]
- EXPORT TIM2_IRQHandler [WEAK]
- EXPORT PKA_IRQHandler [WEAK]
- EXPORT I2C1_EV_IRQHandler [WEAK]
- EXPORT I2C1_ER_IRQHandler [WEAK]
- EXPORT I2C3_EV_IRQHandler [WEAK]
- EXPORT I2C3_ER_IRQHandler [WEAK]
- EXPORT SPI1_IRQHandler [WEAK]
- EXPORT SPI2_IRQHandler [WEAK]
- EXPORT USART1_IRQHandler [WEAK]
- EXPORT LPUART1_IRQHandler [WEAK]
- EXPORT SAI1_IRQHandler [WEAK]
- EXPORT TSC_IRQHandler [WEAK]
- EXPORT EXTI15_10_IRQHandler [WEAK]
- EXPORT RTC_Alarm_IRQHandler [WEAK]
- EXPORT CRS_IRQHandler [WEAK]
- EXPORT PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler [WEAK]
- EXPORT IPCC_C1_RX_IRQHandler [WEAK]
- EXPORT IPCC_C1_TX_IRQHandler [WEAK]
- EXPORT HSEM_IRQHandler [WEAK]
- EXPORT LPTIM1_IRQHandler [WEAK]
- EXPORT LPTIM2_IRQHandler [WEAK]
- EXPORT LCD_IRQHandler [WEAK]
- EXPORT QUADSPI_IRQHandler [WEAK]
- EXPORT AES1_IRQHandler [WEAK]
- EXPORT AES2_IRQHandler [WEAK]
- EXPORT RNG_IRQHandler [WEAK]
- EXPORT FPU_IRQHandler [WEAK]
- EXPORT DMA2_Channel1_IRQHandler [WEAK]
- EXPORT DMA2_Channel2_IRQHandler [WEAK]
- EXPORT DMA2_Channel3_IRQHandler [WEAK]
- EXPORT DMA2_Channel4_IRQHandler [WEAK]
- EXPORT DMA2_Channel5_IRQHandler [WEAK]
- EXPORT DMA2_Channel6_IRQHandler [WEAK]
- EXPORT DMA2_Channel7_IRQHandler [WEAK]
- EXPORT DMAMUX1_OVR_IRQHandler [WEAK]
-
-WWDG_IRQHandler
-PVD_PVM_IRQHandler
-TAMP_STAMP_LSECSS_IRQHandler
-RTC_WKUP_IRQHandler
-FLASH_IRQHandler
-RCC_IRQHandler
-EXTI0_IRQHandler
-EXTI1_IRQHandler
-EXTI2_IRQHandler
-EXTI3_IRQHandler
-EXTI4_IRQHandler
-DMA1_Channel1_IRQHandler
-DMA1_Channel2_IRQHandler
-DMA1_Channel3_IRQHandler
-DMA1_Channel4_IRQHandler
-DMA1_Channel5_IRQHandler
-DMA1_Channel6_IRQHandler
-DMA1_Channel7_IRQHandler
-ADC1_IRQHandler
-USB_HP_IRQHandler
-USB_LP_IRQHandler
-C2SEV_PWR_C2H_IRQHandler
-COMP_IRQHandler
-EXTI9_5_IRQHandler
-TIM1_BRK_IRQHandler
-TIM1_UP_TIM16_IRQHandler
-TIM1_TRG_COM_TIM17_IRQHandler
-TIM1_CC_IRQHandler
-TIM2_IRQHandler
-PKA_IRQHandler
-I2C1_EV_IRQHandler
-I2C1_ER_IRQHandler
-I2C3_EV_IRQHandler
-I2C3_ER_IRQHandler
-SPI1_IRQHandler
-SPI2_IRQHandler
-USART1_IRQHandler
-LPUART1_IRQHandler
-SAI1_IRQHandler
-TSC_IRQHandler
-EXTI15_10_IRQHandler
-RTC_Alarm_IRQHandler
-CRS_IRQHandler
-PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler
-IPCC_C1_RX_IRQHandler
-IPCC_C1_TX_IRQHandler
-HSEM_IRQHandler
-LPTIM1_IRQHandler
-LPTIM2_IRQHandler
-LCD_IRQHandler
-QUADSPI_IRQHandler
-AES1_IRQHandler
-AES2_IRQHandler
-RNG_IRQHandler
-FPU_IRQHandler
-DMA2_Channel1_IRQHandler
-DMA2_Channel2_IRQHandler
-DMA2_Channel3_IRQHandler
-DMA2_Channel4_IRQHandler
-DMA2_Channel5_IRQHandler
-DMA2_Channel6_IRQHandler
-DMA2_Channel7_IRQHandler
-DMAMUX1_OVR_IRQHandler
-
- B .
-
- ENDP
-
- ALIGN
-
-;*******************************************************************************
-; User Stack and Heap initialization
-;*******************************************************************************
- IF :DEF:__MICROLIB
-
- EXPORT __initial_sp
- EXPORT __heap_base
- EXPORT __heap_limit
-
- ELSE
-
- IMPORT __use_two_region_memory
- EXPORT __user_initial_stackheap
-
-__user_initial_stackheap
-
- LDR R0, = Heap_Mem
- LDR R1, =(Stack_Mem + Stack_Size)
- LDR R2, = (Heap_Mem + Heap_Size)
- LDR R3, = Stack_Mem
- BX LR
-
- ALIGN
-
- ENDIF
-
- END
-
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/MDK-ARM/stm32wb5mxx_flash_cm4.sct b/Projects/STM32WB5MM-DK/Examples/BSP/MDK-ARM/stm32wb5mxx_flash_cm4.sct
deleted file mode 100644
index 8ae76f12b..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/MDK-ARM/stm32wb5mxx_flash_cm4.sct
+++ /dev/null
@@ -1,24 +0,0 @@
-; *************************************************************
-; *** Scatter-Loading Description File generated by uVision ***
-; *************************************************************
-
-LR_IROM1 0x08000000 0x00080000 { ; load region size_region
- ER_IROM1 0x08000000 0x00080000 { ; load address = execution address
- *.o (RESET, +First)
- *(InRoot$$Sections)
- .ANY (+RO)
- }
- RW_IRAM1 0x20000008 0x2FFF8 { ; RW data
- .ANY (+RW +ZI)
- }
- RW_RAM_SHARED 0x20030000 0x2800 { ; RW data
- *(MAPPING_TABLE)
- *(MB_MEM1)
- *(MB_MEM2)
- }
- OSPI_RAM 0x90000000 0x100000 {
- *.o (.ospi)
- }
- }
-
-
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/.cproject b/Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/.cproject
deleted file mode 100644
index 757375e11..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/.cproject
+++ /dev/null
@@ -1,428 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
-
- <storageModule moduleId="org.eclipse.cdt.core.settings">
-
- <cconfiguration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.468366784">
-
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.468366784" moduleId="org.eclipse.cdt.core.settings" name="Debug">
-
- <externalSettings/>
-
- <extensions>
-
- <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-
- <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-
- <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-
- <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-
- <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
-
- <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-
- </extensions>
-
- </storageModule>
-
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
-
- <configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.468366784" name="Debug" parent="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug">
-
- <folderInfo id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.468366784." name="/" resourcePath="">
-
- <toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug.1063593508" name="MCU ARM GCC" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.debug">
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu.2062025651" name="Mcu" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" useByScannerDiscovery="true" value="STM32WB5MMGHx" valueType="string"/>
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.1644493889" name="CpuId" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" useByScannerDiscovery="false" value="0" valueType="string"/>
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.398236326" name="CpuCoreId" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/>
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.1969038168" name="Floating-point unit" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.value.fpv4-sp-d16" valueType="enumerated"/>
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.775798921" name="Floating-point ABI" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.value.hard" valueType="enumerated"/>
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.2138530632" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="STM32WB5MM-DK" valueType="string"/>
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.1530216229" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.4 || Debug || true || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32WB5MM-DK || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../../Inc | ../../Src/vl53l0x | ../../../../../../Drivers/CMSIS/Include | ../../../../../../Drivers/CMSIS/Device/ST/STM32WBxx/Include | ../../../../../../Drivers/STM32WBxx_HAL_Driver/Inc | ../../../../../../Drivers/BSP/STM32WB5MM-DK | ../../../../../../Drivers/BSP/Components/Common | ../../../../../../Drivers/BSP/Components/ism330dhcx | ../../../../../../Drivers/BSP/Components/s25fl128s | ../../../../../../Utilities/LCD | ../../../../../../Middlewares/ST/STM32_Audio/Addons/PDM/Inc | ../../Inc/usb | ../../../../../../Middlewares/ST/STM32_USB_Device_Library/Core/Inc | ../../../../../../Drivers/CMSIS/DSP/Source/FilteringFunctions | ../../../../../../Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc | ../../../../../../Drivers/CMSIS/DSP/Include | ../../../../../../Drivers/BSP/Components/stts22h || || || USE_USB_FS | USE_HAL_DRIVER | USE_STM32WB5M_DK | STM32WB5Mxx | ARM_MATH_CM4 | CORE_CM4 | STM32WB55xx || || || || ../../../../../../Middlewares/ST/STM32_Audio/Addons/PDM/Lib/libPDMFilter_CM4_IAR_wc32.a || ${workspace_loc:/${ProjName}/STM32WB5MMGHX_FLASH.ld} || true || NonSecure || || || || None" valueType="string"/>
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.converthex.1155824987" name="Convert to Intel Hex file (-O ihex)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.converthex" useByScannerDiscovery="false" value="true" valueType="boolean"/>
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.nanoprintffloat.830971553" name="Use float with printf from newlib-nano (-u _printf_float)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.nanoprintffloat" useByScannerDiscovery="false" value="true" valueType="boolean"/>
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.nanoscanffloat.431584756" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.nanoscanffloat" value="true" valueType="boolean"/>
-
- <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.220671905" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
-
- <builder buildPath="${workspace_loc:/BSP}/Debug" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.472726362" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.126556420" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.1271550193" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.value.g3" valueType="enumerated"/>
-
- <inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input.2102231469" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
-
- </tool>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.535597665" name="MCU GCC Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler">
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.2129194567" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.value.g3" valueType="enumerated"/>
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.220926330" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false"/>
-
- <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.464902437" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
-
- <listOptionValue builtIn="false" value="DEBUG"/>
-
- <listOptionValue builtIn="false" value="USE_USB_FS"/>
-
- <listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
-
- <listOptionValue builtIn="false" value="USE_STM32WB5M_DK"/>
-
- <listOptionValue builtIn="false" value="STM32WB5Mxx"/>
-
- <listOptionValue builtIn="false" value="ARM_MATH_CM4"/>
-
- <listOptionValue builtIn="false" value="CORE_CM4"/>
-
- <listOptionValue builtIn="false" value="STM32WB55xx"/>
-
- </option>
-
- <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.1011517432" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" useByScannerDiscovery="false" valueType="includePath">
-
- <listOptionValue builtIn="false" value="../../Inc"/>
-
- <listOptionValue builtIn="false" value="../../Src/vl53l0x"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Drivers/CMSIS/Include"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Drivers/CMSIS/Device/ST/STM32WBxx/Include"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Drivers/STM32WBxx_HAL_Driver/Inc"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Drivers/BSP/STM32WB5MM-DK"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Drivers/BSP/Components/Common"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Drivers/BSP/Components/ism330dhcx"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Drivers/BSP/Components/s25fl128s"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Utilities/LCD"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Middlewares/ST/STM32_Audio/Addons/PDM/Inc"/>
-
- <listOptionValue builtIn="false" value="../../Inc/usb"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Middlewares/ST/STM32_USB_Device_Library/Core/Inc"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Drivers/CMSIS/DSP/Source/FilteringFunctions"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Drivers/CMSIS/DSP/Include"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Drivers/BSP/Components/stts22h"/>
-
- </option>
-
- <inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.985188778" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c"/>
-
- </tool>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.881962893" name="MCU G++ Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler">
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.553634031" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.value.g3" valueType="enumerated"/>
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.754353052" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level" useByScannerDiscovery="false"/>
-
- </tool>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.317433049" name="MCU GCC Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker">
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script.1331339736" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32WB5MMGHX_FLASH.ld}" valueType="string"/>
-
- <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.directories.342618419" name="Library search path (-L)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.directories" valueType="libPaths">
-
- <listOptionValue builtIn="false" value="../../../../../../Middlewares/ST/STM32_Audio/Addons/PDM/Lib"/>
-
- </option>
-
- <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.libraries.439413350" name="Libraries (-l)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.libraries" valueType="libs">
-
- <listOptionValue builtIn="false" value=":libPDMFilter_CM4_IAR_wc32.a"/>
-
- </option>
-
- <inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.979610172" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input">
-
- <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
-
- <additionalInput kind="additionalinput" paths="$(LIBS)"/>
-
- </inputType>
-
- </tool>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.1762633351" name="MCU G++ Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker"/>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.142837830" name="MCU GCC Archiver" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver"/>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.505387363" name="MCU Size" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size"/>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile.1001996395" name="MCU Output Converter list file" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile"/>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex.1337007790" name="MCU Output Converter Hex" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex"/>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary.644922386" name="MCU Output Converter Binary" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary"/>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog.1991673224" name="MCU Output Converter Verilog" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog"/>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec.1305537080" name="MCU Output Converter Motorola S-rec" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec"/>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.2133339286" name="MCU Output Converter Motorola S-rec with symbols" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec"/>
-
- </toolChain>
-
- </folderInfo>
-
- </configuration>
-
- </storageModule>
-
- <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-
- </cconfiguration>
-
- <cconfiguration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.529761724">
-
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.529761724" moduleId="org.eclipse.cdt.core.settings" name="Release">
-
- <externalSettings/>
-
- <extensions>
-
- <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-
- <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-
- <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-
- <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-
- <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
-
- <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-
- </extensions>
-
- </storageModule>
-
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
-
- <configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.529761724" name="Release" parent="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release">
-
- <folderInfo id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.529761724." name="/" resourcePath="">
-
- <toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release.112477081" name="MCU ARM GCC" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release">
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu.1750391252" name="Mcu" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" useByScannerDiscovery="true" value="STM32WB5MMGHx" valueType="string"/>
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.461870081" name="CpuId" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" useByScannerDiscovery="false" value="0" valueType="string"/>
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.1397857488" name="CpuCoreId" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/>
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.165208150" name="Floating-point unit" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.fpu.value.fpv4-sp-d16" valueType="enumerated"/>
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.699024414" name="Floating-point ABI" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi" useByScannerDiscovery="true" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.floatabi.value.hard" valueType="enumerated"/>
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.191788206" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="STM32WB5MM-DK" valueType="string"/>
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.1604183216" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.4 || Release || false || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.option.toolchain.value.workspace || STM32WB5MM-DK || 0 || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../../Inc | ../../Src/vl53l0x | ../../../../../../Drivers/CMSIS/Include | ../../../../../../Drivers/CMSIS/Device/ST/STM32WBxx/Include | ../../../../../../Drivers/STM32WBxx_HAL_Driver/Inc | ../../../../../../Drivers/BSP/STM32WB5MM-DK | ../../../../../../Drivers/BSP/Components/Common | ../../../../../../Drivers/BSP/Components/ism330dhcx | ../../../../../../Drivers/BSP/Components/s25fl128s | ../../../../../../Utilities/LCD | ../../../../../../Middlewares/ST/STM32_Audio/Addons/PDM/Inc | ../../Inc/usb | ../../../../../../Middlewares/ST/STM32_USB_Device_Library/Core/Inc | ../../../../../../Drivers/CMSIS/DSP/Source/FilteringFunctions | ../../../../../../Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc | ../../../../../../Drivers/CMSIS/DSP/Include | ../../../../../../Drivers/BSP/Components/stts22h || || || USE_USB_FS | USE_HAL_DRIVER | USE_STM32WB5M_DK | STM32WB5Mxx | ARM_MATH_CM4 | CORE_CM4 | STM32WB55xx || || || || ../../../../../../Middlewares/ST/STM32_Audio/Addons/PDM/Lib/libPDMFilter_CM4_IAR_wc32.a || ${workspace_loc:/${ProjName}/STM32WB5MMGHX_FLASH.ld} || true || NonSecure || Size || || || None" valueType="string"/>
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.converthex.785546085" name="Convert to Intel Hex file (-O ihex)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.converthex" useByScannerDiscovery="false" value="true" valueType="boolean"/>
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.nanoprintffloat.1193572200" name="Use float with printf from newlib-nano (-u _printf_float)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.nanoprintffloat" useByScannerDiscovery="false" value="true" valueType="boolean"/>
-
- <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.718458497" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
-
- <builder buildPath="${workspace_loc:/BSP}/Release" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.1673391431" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.180414554" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.1511515619" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.value.g0" valueType="enumerated"/>
-
- <inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input.1589214286" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
-
- </tool>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1794316608" name="MCU GCC Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler">
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.993675892" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.value.g0" valueType="enumerated"/>
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.1672471517" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.value.os" valueType="enumerated"/>
-
- <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.1477884786" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
-
- <listOptionValue builtIn="false" value="USE_USB_FS"/>
-
- <listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
-
- <listOptionValue builtIn="false" value="USE_STM32WB5M_DK"/>
-
- <listOptionValue builtIn="false" value="STM32WB5Mxx"/>
-
- <listOptionValue builtIn="false" value="ARM_MATH_CM4"/>
-
- <listOptionValue builtIn="false" value="CORE_CM4"/>
-
- <listOptionValue builtIn="false" value="STM32WB55xx"/>
-
- </option>
-
- <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.1266025267" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" useByScannerDiscovery="false" valueType="includePath">
-
- <listOptionValue builtIn="false" value="../../Inc"/>
-
- <listOptionValue builtIn="false" value="../../Src/vl53l0x"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Drivers/CMSIS/Include"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Drivers/CMSIS/Device/ST/STM32WBxx/Include"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Drivers/STM32WBxx_HAL_Driver/Inc"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Drivers/BSP/STM32WB5MM-DK"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Drivers/BSP/Components/Common"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Drivers/BSP/Components/ism330dhcx"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Drivers/BSP/Components/s25fl128s"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Utilities/LCD"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Middlewares/ST/STM32_Audio/Addons/PDM/Inc"/>
-
- <listOptionValue builtIn="false" value="../../Inc/usb"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Middlewares/ST/STM32_USB_Device_Library/Core/Inc"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Drivers/CMSIS/DSP/Source/FilteringFunctions"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Drivers/CMSIS/DSP/Include"/>
-
- <listOptionValue builtIn="false" value="../../../../../../Drivers/BSP/Components/stts22h"/>
-
- </option>
-
- <inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.618540734" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c"/>
-
- </tool>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.1648883806" name="MCU G++ Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler">
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.2034977464" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.value.g0" valueType="enumerated"/>
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.969129445" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.value.os" valueType="enumerated"/>
-
- </tool>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.560278946" name="MCU GCC Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker">
-
- <option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script.497303404" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32WB5MMGHX_FLASH.ld}" valueType="string"/>
-
- <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.directories.674268335" name="Library search path (-L)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.directories" valueType="libPaths">
-
- <listOptionValue builtIn="false" value="../../../../../../Middlewares/ST/STM32_Audio/Addons/PDM/Lib"/>
-
- </option>
-
- <option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.libraries.371379097" name="Libraries (-l)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.libraries" valueType="libs">
-
- <listOptionValue builtIn="false" value=":libPDMFilter_CM4_IAR_wc32.a"/>
-
- </option>
-
- <inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.834062243" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input">
-
- <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
-
- <additionalInput kind="additionalinput" paths="$(LIBS)"/>
-
- </inputType>
-
- </tool>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.206101902" name="MCU G++ Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker"/>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.261929001" name="MCU GCC Archiver" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver"/>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.942053586" name="MCU Size" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size"/>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile.1566170328" name="MCU Output Converter list file" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile"/>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex.1750528222" name="MCU Output Converter Hex" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex"/>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary.709756265" name="MCU Output Converter Binary" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary"/>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog.2077213814" name="MCU Output Converter Verilog" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog"/>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec.235542410" name="MCU Output Converter Motorola S-rec" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec"/>
-
- <tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.1418259102" name="MCU Output Converter Motorola S-rec with symbols" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec"/>
-
- </toolChain>
-
- </folderInfo>
-
- </configuration>
-
- </storageModule>
-
- <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-
- </cconfiguration>
-
- </storageModule>
-
- <storageModule moduleId="org.eclipse.cdt.core.pathentry"/>
-
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
-
- <project id="BSP.null.1328810559" name="BSP"/>
-
- </storageModule>
-
- <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
-
- <storageModule moduleId="scannerConfiguration">
-
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
-
- <scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.529761724;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.529761724.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1794316608;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.618540734">
-
- <autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
-
- </scannerConfigBuildInfo>
-
- <scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.468366784;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.468366784.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.535597665;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.985188778">
-
- <autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
-
- </scannerConfigBuildInfo>
-
- </storageModule>
-
- <storageModule moduleId="refreshScope"/>
-
- <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
-
-</cproject>
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/.project b/Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/.project
deleted file mode 100644
index 2dc2e15ba..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/.project
+++ /dev/null
@@ -1,369 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>BSP</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
- <triggers>clean,full,incremental,</triggers>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.st.stm32cube.ide.mcu.MCUProjectNature</nature>
- <nature>org.eclipse.cdt.core.cnature</nature>
- <nature>com.st.stm32cube.ide.mcu.MCUCubeIdeServicesRevAev2ProjectNature</nature>
- <nature>com.st.stm32cube.ide.mcu.MCUNonUnderRootProjectNature</nature>
- <nature>com.st.stm32cube.ide.mcu.MCUCubeExampleProjectNature</nature>
- <nature>com.st.stm32cube.ide.mcu.MCUSingleCpuProjectNature</nature>
- <nature>com.st.stm32cube.ide.mcu.MCURootProjectNature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
- </natures>
- <linkedResources>
- <link>
- <name>Doc/readme.txt</name>
- <type>1</type>
- <locationURI>PARENT-1-PROJECT_LOC/readme.txt</locationURI>
- </link>
- <link>
- <name>Utilities/stm32_lcd.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Utilities/LCD/stm32_lcd.c</locationURI>
- </link>
- <link>
- <name>Drivers/CMSIS/system_stm32wbxx.c</name>
- <type>1</type>
- <locationURI>PARENT-1-PROJECT_LOC/Src/system_stm32wbxx.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_cortex.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_cortex.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_dma.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_dma.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_exti.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_exti.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_flash.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_flash_ex.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_flash_ex.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_gpio.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_gpio.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_i2c.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_i2c_ex.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_i2c_ex.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_pcd.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pcd.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_pcd_ex.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pcd_ex.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_pwr.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_pwr_ex.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_pwr_ex.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_qspi.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_qspi.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_rcc.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_rcc_ex.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_rcc_ex.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_sai.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_sai.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_sai_ex.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_sai_ex.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_spi.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_spi.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_tim.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_tim.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_tim_ex.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_tim_ex.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_uart.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_uart.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_hal_uart_ex.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal_uart_ex.c</locationURI>
- </link>
- <link>
- <name>Drivers/STM32WBxx_HAL_Driver/stm32wbxx_ll_usb.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_ll_usb.c</locationURI>
- </link>
- <link>
- <name>Example/User/lcd.c</name>
- <type>1</type>
- <locationURI>PARENT-1-PROJECT_LOC/Src/lcd.c</locationURI>
- </link>
- <link>
- <name>Example/User/led.c</name>
- <type>1</type>
- <locationURI>PARENT-1-PROJECT_LOC/Src/led.c</locationURI>
- </link>
- <link>
- <name>Example/User/main.c</name>
- <type>1</type>
- <locationURI>PARENT-1-PROJECT_LOC/Src/main.c</locationURI>
- </link>
- <link>
- <name>Example/User/proximity.c</name>
- <type>1</type>
- <locationURI>PARENT-1-PROJECT_LOC/Src/proximity.c</locationURI>
- </link>
- <link>
- <name>Example/User/qspi.c</name>
- <type>1</type>
- <locationURI>PARENT-1-PROJECT_LOC/Src/qspi.c</locationURI>
- </link>
- <link>
- <name>Example/User/record.c</name>
- <type>1</type>
- <locationURI>PARENT-1-PROJECT_LOC/Src/record.c</locationURI>
- </link>
- <link>
- <name>Example/User/sensors.c</name>
- <type>1</type>
- <locationURI>PARENT-1-PROJECT_LOC/Src/sensors.c</locationURI>
- </link>
- <link>
- <name>Example/User/stm32wbxx_it.c</name>
- <type>1</type>
- <locationURI>PARENT-1-PROJECT_LOC/Src/stm32wbxx_it.c</locationURI>
- </link>
- <link>
- <name>Drivers/BSP/Components/ism330dhcx.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/BSP/Components/ism330dhcx/ism330dhcx.c</locationURI>
- </link>
- <link>
- <name>Drivers/BSP/Components/ism330dhcx_reg.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/BSP/Components/ism330dhcx/ism330dhcx_reg.c</locationURI>
- </link>
- <link>
- <name>Drivers/BSP/Components/s25fl128s.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/BSP/Components/s25fl128s/s25fl128s.c</locationURI>
- </link>
- <link>
- <name>Drivers/BSP/Components/ssd1315.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/BSP/Components/ssd1315/ssd1315.c</locationURI>
- </link>
- <link>
- <name>Drivers/BSP/Components/ssd1315_reg.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/BSP/Components/ssd1315/ssd1315_reg.c</locationURI>
- </link>
- <link>
- <name>Drivers/BSP/Components/stts22h.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/BSP/Components/stts22h/stts22h.c</locationURI>
- </link>
- <link>
- <name>Drivers/BSP/Components/stts22h_reg.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/BSP/Components/stts22h/stts22h_reg.c</locationURI>
- </link>
- <link>
- <name>Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk.c</locationURI>
- </link>
- <link>
- <name>Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_audio.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_audio.c</locationURI>
- </link>
- <link>
- <name>Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_bus.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_bus.c</locationURI>
- </link>
- <link>
- <name>Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_env_sensors.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_env_sensors.c</locationURI>
- </link>
- <link>
- <name>Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_env_sensors_ex.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_env_sensors_ex.c</locationURI>
- </link>
- <link>
- <name>Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_lcd.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_lcd.c</locationURI>
- </link>
- <link>
- <name>Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_motion_sensors.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_motion_sensors.c</locationURI>
- </link>
- <link>
- <name>Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_motion_sensors_ex.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_motion_sensors_ex.c</locationURI>
- </link>
- <link>
- <name>Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_qspi.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/BSP/STM32WB5MM-DK/stm32wb5mm_dk_qspi.c</locationURI>
- </link>
- <link>
- <name>Example/User/usb/usbd_audio_if.c</name>
- <type>1</type>
- <locationURI>PARENT-1-PROJECT_LOC/Src/usb/usbd_audio_if.c</locationURI>
- </link>
- <link>
- <name>Example/User/usb/usbd_audio_in.c</name>
- <type>1</type>
- <locationURI>PARENT-1-PROJECT_LOC/Src/usb/usbd_audio_in.c</locationURI>
- </link>
- <link>
- <name>Example/User/usb/usbd_conf.c</name>
- <type>1</type>
- <locationURI>PARENT-1-PROJECT_LOC/Src/usb/usbd_conf.c</locationURI>
- </link>
- <link>
- <name>Example/User/usb/usbd_desc.c</name>
- <type>1</type>
- <locationURI>PARENT-1-PROJECT_LOC/Src/usb/usbd_desc.c</locationURI>
- </link>
- <link>
- <name>Example/User/vl53l0x/vl53l0x_api.c</name>
- <type>1</type>
- <locationURI>PARENT-1-PROJECT_LOC/Src/vl53l0x/vl53l0x_api.c</locationURI>
- </link>
- <link>
- <name>Example/User/vl53l0x/vl53l0x_api_calibration.c</name>
- <type>1</type>
- <locationURI>PARENT-1-PROJECT_LOC/Src/vl53l0x/vl53l0x_api_calibration.c</locationURI>
- </link>
- <link>
- <name>Example/User/vl53l0x/vl53l0x_api_core.c</name>
- <type>1</type>
- <locationURI>PARENT-1-PROJECT_LOC/Src/vl53l0x/vl53l0x_api_core.c</locationURI>
- </link>
- <link>
- <name>Example/User/vl53l0x/vl53l0x_api_ranging.c</name>
- <type>1</type>
- <locationURI>PARENT-1-PROJECT_LOC/Src/vl53l0x/vl53l0x_api_ranging.c</locationURI>
- </link>
- <link>
- <name>Example/User/vl53l0x/vl53l0x_api_strings.c</name>
- <type>1</type>
- <locationURI>PARENT-1-PROJECT_LOC/Src/vl53l0x/vl53l0x_api_strings.c</locationURI>
- </link>
- <link>
- <name>Example/User/vl53l0x/vl53l0x_platform_log.c</name>
- <type>1</type>
- <locationURI>PARENT-1-PROJECT_LOC/Src/vl53l0x/vl53l0x_platform_log.c</locationURI>
- </link>
- <link>
- <name>Example/User/vl53l0x/vl53l0x_tof.c</name>
- <type>1</type>
- <locationURI>PARENT-1-PROJECT_LOC/Src/vl53l0x/vl53l0x_tof.c</locationURI>
- </link>
- <link>
- <name>Middlewares/ST/STM32_USB_Device_Library/Core/usbd_core.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c</locationURI>
- </link>
- <link>
- <name>Middlewares/ST/STM32_USB_Device_Library/Core/usbd_ctlreq.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c</locationURI>
- </link>
- <link>
- <name>Middlewares/ST/STM32_USB_Device_Library/Core/usbd_ioreq.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c</locationURI>
- </link>
- <link>
- <name>Drivers/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_init_q15.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_init_q15.c</locationURI>
- </link>
- <link>
- <name>Drivers/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_q15.c</name>
- <type>1</type>
- <locationURI>PARENT-5-PROJECT_LOC/Drivers/CMSIS/DSP/Source/FilteringFunctions/arm_fir_decimate_q15.c</locationURI>
- </link>
- </linkedResources>
-</projectDescription>
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/Example/Startup/startup_stm32wb5mmghx.s b/Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/Example/Startup/startup_stm32wb5mmghx.s
deleted file mode 100644
index 46e9bcbe4..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/Example/Startup/startup_stm32wb5mmghx.s
+++ /dev/null
@@ -1,445 +0,0 @@
-/**
- ******************************************************************************
- * @file startup_stm32wb5mxx_cm4.s
- * @author MCD Application Team
- * @brief STM32WB5Mxx devices vector table GCC toolchain.
- * This module performs:
- * - Set the initial SP
- * - Set the initial PC == Reset_Handler,
- * - Set the vector table entries with the exceptions ISR address
- * - Branches to main in the C library (which eventually
- * calls main()).
- * After Reset the Cortex-M4 processor is in Thread mode,
- * priority is Privileged, and the Stack is set to Main.
- ******************************************************************************
- * @attention
- *
- * <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
- * All rights reserved.</center></h2>
- *
-* This software component is licensed by ST under Apache License, Version 2.0,
- * the "License"; You may not use this file except in compliance with the
- * License. You may obtain a copy of the License at:
- * opensource.org/licenses/Apache-2.0
- *
- ******************************************************************************
- */
-
- .syntax unified
- .cpu cortex-m4
- .fpu softvfp
- .thumb
-
-.global g_pfnVectors
-.global Default_Handler
-
-/* start address for the initialization values of the .data section.
-defined in linker script */
-.word _sidata
-/* start address for the .data section. defined in linker script */
-.word _sdata
-/* end address for the .data section. defined in linker script */
-.word _edata
-/* start address for the .bss section. defined in linker script */
-.word _sbss
-/* end address for the .bss section. defined in linker script */
-.word _ebss
-/* start address for the .MB_MEM2 section. defined in linker script */
-.word _sMB_MEM2
-/* end address for the .MB_MEM2 section. defined in linker script */
-.word _eMB_MEM2
-
-/* INIT_BSS macro is used to fill the specified region [start : end] with zeros */
-.macro INIT_BSS start, end
- ldr r0, =\start
- ldr r1, =\end
- movs r3, #0
- bl LoopFillZerobss
-.endm
-
-/* INIT_DATA macro is used to copy data in the region [start : end] starting from 'src' */
-.macro INIT_DATA start, end, src
- ldr r0, =\start
- ldr r1, =\end
- ldr r2, =\src
- movs r3, #0
- bl LoopCopyDataInit
-.endm
-
-.section .text.data_initializers
-CopyDataInit:
- ldr r4, [r2, r3]
- str r4, [r0, r3]
- adds r3, r3, #4
-
-LoopCopyDataInit:
- adds r4, r0, r3
- cmp r4, r1
- bcc CopyDataInit
- bx lr
-
-FillZerobss:
- str r3, [r0]
- adds r0, r0, #4
-
-LoopFillZerobss:
- cmp r0, r1
- bcc FillZerobss
- bx lr
-
- .section .text.Reset_Handler
- .weak Reset_Handler
- .type Reset_Handler, %function
-Reset_Handler:
- ldr r0, =_estack
- mov sp, r0 /* set stack pointer */
-/* Call the clock system initialization function.*/
- bl SystemInit
-
-/* Copy the data segment initializers from flash to SRAM */
- INIT_DATA _sdata, _edata, _sidata
-
-/* Zero fill the bss segments. */
- INIT_BSS _sbss, _ebss
- INIT_BSS _sMB_MEM2, _eMB_MEM2
-
-/* Call static constructors */
- bl __libc_init_array
-/* Call the application s entry point.*/
- bl main
-
-LoopForever:
- b LoopForever
-
-.size Reset_Handler, .-Reset_Handler
-
-/**
- * @brief This is the code that gets called when the processor receives an
- * unexpected interrupt. This simply enters an infinite loop, preserving
- * the system state for examination by a debugger.
- *
- * @param None
- * @retval None
-*/
- .section .text.Default_Handler,"ax",%progbits
-Default_Handler:
-Infinite_Loop:
- b Infinite_Loop
- .size Default_Handler, .-Default_Handler
-/******************************************************************************
-*
-* The minimal vector table for a Cortex-M4. Note that the proper constructs
-* must be placed on this to ensure that it ends up at physical address
-* 0x0000.0000.
-*
-******************************************************************************/
- .section .isr_vector,"a",%progbits
- .type g_pfnVectors, %object
- .size g_pfnVectors, .-g_pfnVectors
-
-
-g_pfnVectors:
- .word _estack
- .word Reset_Handler
- .word NMI_Handler
- .word HardFault_Handler
- .word MemManage_Handler
- .word BusFault_Handler
- .word UsageFault_Handler
- .word 0
- .word 0
- .word 0
- .word 0
- .word SVC_Handler
- .word DebugMon_Handler
- .word 0
- .word PendSV_Handler
- .word SysTick_Handler
- .word WWDG_IRQHandler
- .word PVD_PVM_IRQHandler
- .word TAMP_STAMP_LSECSS_IRQHandler
- .word RTC_WKUP_IRQHandler
- .word FLASH_IRQHandler
- .word RCC_IRQHandler
- .word EXTI0_IRQHandler
- .word EXTI1_IRQHandler
- .word EXTI2_IRQHandler
- .word EXTI3_IRQHandler
- .word EXTI4_IRQHandler
- .word DMA1_Channel1_IRQHandler
- .word DMA1_Channel2_IRQHandler
- .word DMA1_Channel3_IRQHandler
- .word DMA1_Channel4_IRQHandler
- .word DMA1_Channel5_IRQHandler
- .word DMA1_Channel6_IRQHandler
- .word DMA1_Channel7_IRQHandler
- .word ADC1_IRQHandler
- .word USB_HP_IRQHandler
- .word USB_LP_IRQHandler
- .word C2SEV_PWR_C2H_IRQHandler
- .word COMP_IRQHandler
- .word EXTI9_5_IRQHandler
- .word TIM1_BRK_IRQHandler
- .word TIM1_UP_TIM16_IRQHandler
- .word TIM1_TRG_COM_TIM17_IRQHandler
- .word TIM1_CC_IRQHandler
- .word TIM2_IRQHandler
- .word PKA_IRQHandler
- .word I2C1_EV_IRQHandler
- .word I2C1_ER_IRQHandler
- .word I2C3_EV_IRQHandler
- .word I2C3_ER_IRQHandler
- .word SPI1_IRQHandler
- .word SPI2_IRQHandler
- .word USART1_IRQHandler
- .word LPUART1_IRQHandler
- .word SAI1_IRQHandler
- .word TSC_IRQHandler
- .word EXTI15_10_IRQHandler
- .word RTC_Alarm_IRQHandler
- .word CRS_IRQHandler
- .word PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler
- .word IPCC_C1_RX_IRQHandler
- .word IPCC_C1_TX_IRQHandler
- .word HSEM_IRQHandler
- .word LPTIM1_IRQHandler
- .word LPTIM2_IRQHandler
- .word LCD_IRQHandler
- .word QUADSPI_IRQHandler
- .word AES1_IRQHandler
- .word AES2_IRQHandler
- .word RNG_IRQHandler
- .word FPU_IRQHandler
- .word DMA2_Channel1_IRQHandler
- .word DMA2_Channel2_IRQHandler
- .word DMA2_Channel3_IRQHandler
- .word DMA2_Channel4_IRQHandler
- .word DMA2_Channel5_IRQHandler
- .word DMA2_Channel6_IRQHandler
- .word DMA2_Channel7_IRQHandler
- .word DMAMUX1_OVR_IRQHandler
-
-/*******************************************************************************
-*
-* Provide weak aliases for each Exception handler to the Default_Handler.
-* As they are weak aliases, any function with the same name will override
-* this definition.
-*
-*******************************************************************************/
- .weak NMI_Handler
- .thumb_set NMI_Handler,Default_Handler
-
- .weak HardFault_Handler
- .thumb_set HardFault_Handler,Default_Handler
-
- .weak MemManage_Handler
- .thumb_set MemManage_Handler,Default_Handler
-
- .weak BusFault_Handler
- .thumb_set BusFault_Handler,Default_Handler
-
- .weak UsageFault_Handler
- .thumb_set UsageFault_Handler,Default_Handler
-
- .weak SVC_Handler
- .thumb_set SVC_Handler,Default_Handler
-
- .weak DebugMon_Handler
- .thumb_set DebugMon_Handler,Default_Handler
-
- .weak PendSV_Handler
- .thumb_set PendSV_Handler,Default_Handler
-
- .weak SysTick_Handler
- .thumb_set SysTick_Handler,Default_Handler
-
- .weak WWDG_IRQHandler
- .thumb_set WWDG_IRQHandler,Default_Handler
-
- .weak PVD_PVM_IRQHandler
- .thumb_set PVD_PVM_IRQHandler,Default_Handler
-
- .weak TAMP_STAMP_LSECSS_IRQHandler
- .thumb_set TAMP_STAMP_LSECSS_IRQHandler,Default_Handler
-
- .weak RTC_WKUP_IRQHandler
- .thumb_set RTC_WKUP_IRQHandler,Default_Handler
-
- .weak FLASH_IRQHandler
- .thumb_set FLASH_IRQHandler,Default_Handler
-
- .weak RCC_IRQHandler
- .thumb_set RCC_IRQHandler,Default_Handler
-
- .weak EXTI0_IRQHandler
- .thumb_set EXTI0_IRQHandler,Default_Handler
-
- .weak EXTI1_IRQHandler
- .thumb_set EXTI1_IRQHandler,Default_Handler
-
- .weak EXTI2_IRQHandler
- .thumb_set EXTI2_IRQHandler,Default_Handler
-
- .weak EXTI3_IRQHandler
- .thumb_set EXTI3_IRQHandler,Default_Handler
-
- .weak EXTI4_IRQHandler
- .thumb_set EXTI4_IRQHandler,Default_Handler
-
- .weak DMA1_Channel1_IRQHandler
- .thumb_set DMA1_Channel1_IRQHandler,Default_Handler
-
- .weak DMA1_Channel2_IRQHandler
- .thumb_set DMA1_Channel2_IRQHandler,Default_Handler
-
- .weak DMA1_Channel3_IRQHandler
- .thumb_set DMA1_Channel3_IRQHandler,Default_Handler
-
- .weak DMA1_Channel4_IRQHandler
- .thumb_set DMA1_Channel4_IRQHandler,Default_Handler
-
- .weak DMA1_Channel5_IRQHandler
- .thumb_set DMA1_Channel5_IRQHandler,Default_Handler
-
- .weak DMA1_Channel6_IRQHandler
- .thumb_set DMA1_Channel6_IRQHandler,Default_Handler
-
- .weak DMA1_Channel7_IRQHandler
- .thumb_set DMA1_Channel7_IRQHandler,Default_Handler
-
- .weak ADC1_IRQHandler
- .thumb_set ADC1_IRQHandler,Default_Handler
-
- .weak USB_HP_IRQHandler
- .thumb_set USB_HP_IRQHandler,Default_Handler
-
- .weak USB_LP_IRQHandler
- .thumb_set USB_LP_IRQHandler,Default_Handler
-
- .weak C2SEV_PWR_C2H_IRQHandler
- .thumb_set C2SEV_PWR_C2H_IRQHandler,Default_Handler
-
- .weak COMP_IRQHandler
- .thumb_set COMP_IRQHandler,Default_Handler
-
- .weak EXTI9_5_IRQHandler
- .thumb_set EXTI9_5_IRQHandler,Default_Handler
-
- .weak TIM1_BRK_IRQHandler
- .thumb_set TIM1_BRK_IRQHandler,Default_Handler
-
- .weak TIM1_UP_TIM16_IRQHandler
- .thumb_set TIM1_UP_TIM16_IRQHandler,Default_Handler
-
- .weak TIM1_TRG_COM_TIM17_IRQHandler
- .thumb_set TIM1_TRG_COM_TIM17_IRQHandler,Default_Handler
-
- .weak TIM1_CC_IRQHandler
- .thumb_set TIM1_CC_IRQHandler,Default_Handler
-
- .weak TIM2_IRQHandler
- .thumb_set TIM2_IRQHandler,Default_Handler
-
- .weak PKA_IRQHandler
- .thumb_set PKA_IRQHandler,Default_Handler
-
- .weak I2C1_EV_IRQHandler
- .thumb_set I2C1_EV_IRQHandler,Default_Handler
-
- .weak I2C1_ER_IRQHandler
- .thumb_set I2C1_ER_IRQHandler,Default_Handler
-
- .weak I2C3_EV_IRQHandler
- .thumb_set I2C3_EV_IRQHandler,Default_Handler
-
- .weak I2C3_ER_IRQHandler
- .thumb_set I2C3_ER_IRQHandler,Default_Handler
-
- .weak SPI1_IRQHandler
- .thumb_set SPI1_IRQHandler,Default_Handler
-
- .weak SPI2_IRQHandler
- .thumb_set SPI2_IRQHandler,Default_Handler
-
- .weak USART1_IRQHandler
- .thumb_set USART1_IRQHandler,Default_Handler
-
- .weak LPUART1_IRQHandler
- .thumb_set LPUART1_IRQHandler,Default_Handler
-
- .weak SAI1_IRQHandler
- .thumb_set SAI1_IRQHandler,Default_Handler
-
- .weak TSC_IRQHandler
- .thumb_set TSC_IRQHandler,Default_Handler
-
- .weak EXTI15_10_IRQHandler
- .thumb_set EXTI15_10_IRQHandler,Default_Handler
-
- .weak RTC_Alarm_IRQHandler
- .thumb_set RTC_Alarm_IRQHandler,Default_Handler
-
- .weak CRS_IRQHandler
- .thumb_set CRS_IRQHandler,Default_Handler
-
- .weak PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler
- .thumb_set PWR_SOTF_BLEACT_802ACT_RFPHASE_IRQHandler,Default_Handler
-
- .weak IPCC_C1_RX_IRQHandler
- .thumb_set IPCC_C1_RX_IRQHandler,Default_Handler
-
- .weak IPCC_C1_TX_IRQHandler
- .thumb_set IPCC_C1_TX_IRQHandler,Default_Handler
-
- .weak HSEM_IRQHandler
- .thumb_set HSEM_IRQHandler,Default_Handler
-
- .weak LPTIM1_IRQHandler
- .thumb_set LPTIM1_IRQHandler,Default_Handler
-
- .weak LPTIM2_IRQHandler
- .thumb_set LPTIM2_IRQHandler,Default_Handler
-
- .weak LCD_IRQHandler
- .thumb_set LCD_IRQHandler,Default_Handler
-
- .weak QUADSPI_IRQHandler
- .thumb_set QUADSPI_IRQHandler,Default_Handler
-
- .weak AES1_IRQHandler
- .thumb_set AES1_IRQHandler,Default_Handler
-
- .weak AES2_IRQHandler
- .thumb_set AES2_IRQHandler,Default_Handler
-
- .weak RNG_IRQHandler
- .thumb_set RNG_IRQHandler,Default_Handler
-
- .weak FPU_IRQHandler
- .thumb_set FPU_IRQHandler,Default_Handler
-
- .weak DMA2_Channel1_IRQHandler
- .thumb_set DMA2_Channel1_IRQHandler,Default_Handler
-
- .weak DMA2_Channel2_IRQHandler
- .thumb_set DMA2_Channel2_IRQHandler,Default_Handler
-
- .weak DMA2_Channel3_IRQHandler
- .thumb_set DMA2_Channel3_IRQHandler,Default_Handler
-
- .weak DMA2_Channel4_IRQHandler
- .thumb_set DMA2_Channel4_IRQHandler,Default_Handler
-
- .weak DMA2_Channel5_IRQHandler
- .thumb_set DMA2_Channel5_IRQHandler,Default_Handler
-
- .weak DMA2_Channel6_IRQHandler
- .thumb_set DMA2_Channel6_IRQHandler,Default_Handler
-
- .weak DMA2_Channel7_IRQHandler
- .thumb_set DMA2_Channel7_IRQHandler,Default_Handler
-
- .weak DMAMUX1_OVR_IRQHandler
- .thumb_set DMAMUX1_OVR_IRQHandler,Default_Handler
-
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/Example/User/syscalls.c b/Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/Example/User/syscalls.c
deleted file mode 100644
index f4278b7ba..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/Example/User/syscalls.c
+++ /dev/null
@@ -1,176 +0,0 @@
-/**
- ******************************************************************************
- * @file syscalls.c
- * @author Auto-generated by STM32CubeIDE
- * @brief STM32CubeIDE Minimal System calls file
- *
- * For more information about which c-functions
- * need which of these lowlevel functions
- * please consult the Newlib libc-manual
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2020-2022 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Includes */
-#include <sys/stat.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <stdio.h>
-#include <signal.h>
-#include <time.h>
-#include <sys/time.h>
-#include <sys/times.h>
-
-
-/* Variables */
-extern int __io_putchar(int ch) __attribute__((weak));
-extern int __io_getchar(void) __attribute__((weak));
-
-
-char *__env[1] = { 0 };
-char **environ = __env;
-
-
-/* Functions */
-void initialise_monitor_handles()
-{
-}
-
-int _getpid(void)
-{
- return 1;
-}
-
-int _kill(int pid, int sig)
-{
- (void)pid;
- (void)sig;
- errno = EINVAL;
- return -1;
-}
-
-void _exit (int status)
-{
- _kill(status, -1);
- while (1) {} /* Make sure we hang here */
-}
-
-__attribute__((weak)) int _read(int file, char *ptr, int len)
-{
- (void)file;
- int DataIdx;
-
- for (DataIdx = 0; DataIdx < len; DataIdx++)
- {
- *ptr++ = __io_getchar();
- }
-
- return len;
-}
-
-__attribute__((weak)) int _write(int file, char *ptr, int len)
-{
- (void)file;
- int DataIdx;
-
- for (DataIdx = 0; DataIdx < len; DataIdx++)
- {
- __io_putchar(*ptr++);
- }
- return len;
-}
-
-int _close(int file)
-{
- (void)file;
- return -1;
-}
-
-
-int _fstat(int file, struct stat *st)
-{
- (void)file;
- st->st_mode = S_IFCHR;
- return 0;
-}
-
-int _isatty(int file)
-{
- (void)file;
- return 1;
-}
-
-int _lseek(int file, int ptr, int dir)
-{
- (void)file;
- (void)ptr;
- (void)dir;
- return 0;
-}
-
-int _open(char *path, int flags, ...)
-{
- (void)path;
- (void)flags;
- /* Pretend like we always fail */
- return -1;
-}
-
-int _wait(int *status)
-{
- (void)status;
- errno = ECHILD;
- return -1;
-}
-
-int _unlink(char *name)
-{
- (void)name;
- errno = ENOENT;
- return -1;
-}
-
-int _times(struct tms *buf)
-{
- (void)buf;
- return -1;
-}
-
-int _stat(char *file, struct stat *st)
-{
- (void)file;
- st->st_mode = S_IFCHR;
- return 0;
-}
-
-int _link(char *old, char *new)
-{
- (void)old;
- (void)new;
- errno = EMLINK;
- return -1;
-}
-
-int _fork(void)
-{
- errno = EAGAIN;
- return -1;
-}
-
-int _execve(char *name, char **argv, char **env)
-{
- (void)name;
- (void)argv;
- (void)env;
- errno = ENOMEM;
- return -1;
-}
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/Example/User/sysmem.c b/Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/Example/User/sysmem.c
deleted file mode 100644
index 54081ac9b..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/Example/User/sysmem.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- ******************************************************************************
- * @file sysmem.c
- * @author Generated by STM32CubeIDE
- * @brief STM32CubeIDE System Memory calls file
- *
- * For more information about which C functions
- * need which of these lowlevel functions
- * please consult the newlib libc manual
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2022 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Includes */
-#include <errno.h>
-#include <stdint.h>
-
-/**
- * Pointer to the current high watermark of the heap usage
- */
-static uint8_t *__sbrk_heap_end = NULL;
-
-/**
- * @brief _sbrk() allocates memory to the newlib heap and is used by malloc
- * and others from the C library
- *
- * @verbatim
- * ############################################################################
- * # .data # .bss # newlib heap # MSP stack #
- * # # # # Reserved by _Min_Stack_Size #
- * ############################################################################
- * ^-- RAM start ^-- _end _estack, RAM end --^
- * @endverbatim
- *
- * This implementation starts allocating at the '_end' linker symbol
- * The '_Min_Stack_Size' linker symbol reserves a memory for the MSP stack
- * The implementation considers '_estack' linker symbol to be RAM end
- * NOTE: If the MSP stack, at any point during execution, grows larger than the
- * reserved size, please increase the '_Min_Stack_Size'.
- *
- * @param incr Memory size
- * @return Pointer to allocated memory
- */
-void *_sbrk(ptrdiff_t incr)
-{
- extern uint8_t _end; /* Symbol defined in the linker script */
- extern uint8_t _estack; /* Symbol defined in the linker script */
- extern uint32_t _Min_Stack_Size; /* Symbol defined in the linker script */
- const uint32_t stack_limit = (uint32_t)&_estack - (uint32_t)&_Min_Stack_Size;
- const uint8_t *max_heap = (uint8_t *)stack_limit;
- uint8_t *prev_heap_end;
-
- /* Initialize heap end at first call */
- if (NULL == __sbrk_heap_end)
- {
- __sbrk_heap_end = &_end;
- }
-
- /* Protect heap from growing into the reserved MSP stack */
- if (__sbrk_heap_end + incr > max_heap)
- {
- errno = ENOMEM;
- return (void *)-1;
- }
-
- prev_heap_end = __sbrk_heap_end;
- __sbrk_heap_end += incr;
-
- return (void *)prev_heap_end;
-}
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/STM32WB5MMGHX_FLASH.ld b/Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/STM32WB5MMGHX_FLASH.ld
deleted file mode 100644
index 04d57d8aa..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/STM32CubeIDE/STM32WB5MMGHX_FLASH.ld
+++ /dev/null
@@ -1,171 +0,0 @@
-/**
-*****************************************************************************
-**
-** File : stm32wb5mxx_flash_cm4.ld
-**
-** Abstract : STM32CubeIDE Minimal System calls file
-**
-** For more information about which c-functions
-** need which of these lowlevel functions
-** please consult the Newlib libc-manual
-**
-** Environment : STM32CubeIDE for MCU
-**
-** Distribution: The file is distributed as is, without any warranty
-** of any kind.
-**
-*****************************************************************************
-** @attention
-**
-** Copyright (c) 2019 STMicroelectronics.
-** All rights reserved.
-**
-** This software is licensed under terms that can be found in the LICENSE file
-** in the root directory of this software component.
-** If no LICENSE file comes with this software, it is provided AS-IS.
-**
-*****************************************************************************
-*/
-
-/* Entry Point */
-ENTRY(Reset_Handler)
-
-/* Highest address of the user mode stack */
-_estack = 0x20030000; /* end of RAM */
-/* Generate a link error if heap and stack don't fit into RAM */
-_Min_Heap_Size = 0x400 ; /* required amount of heap */
-_Min_Stack_Size = 0x1000 ; /* required amount of stack */
-
-/* Specify the memory areas */
-MEMORY
-{
-FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K
-RAM1 (xrw) : ORIGIN = 0x20000008, LENGTH = 0x2FFF8
-RAM_SHARED (xrw) : ORIGIN = 0x20030000, LENGTH = 10K
-}
-
-/* Define output sections */
-SECTIONS
-{
- /* The startup code goes first into FLASH */
- .isr_vector :
- {
- . = ALIGN(4);
- KEEP(*(.isr_vector)) /* Startup code */
- . = ALIGN(4);
- } >FLASH
-
- /* The program code and other data goes into FLASH */
- .text :
- {
- . = ALIGN(4);
- *(.text) /* .text sections (code) */
- *(.text*) /* .text* sections (code) */
- *(.glue_7) /* glue arm to thumb code */
- *(.glue_7t) /* glue thumb to arm code */
- *(.eh_frame)
-
- KEEP (*(.init))
- KEEP (*(.fini))
-
- . = ALIGN(4);
- _etext = .; /* define a global symbols at end of code */
- } >FLASH
-
- /* Constant data goes into FLASH */
- .rodata :
- {
- . = ALIGN(4);
- *(.rodata) /* .rodata sections (constants, strings, etc.) */
- *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
- . = ALIGN(4);
- } >FLASH
-
- .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
- .ARM : {
- __exidx_start = .;
- *(.ARM.exidx*)
- __exidx_end = .;
- } >FLASH
-
- .preinit_array :
- {
- PROVIDE_HIDDEN (__preinit_array_start = .);
- KEEP (*(.preinit_array*))
- PROVIDE_HIDDEN (__preinit_array_end = .);
- } >FLASH
- .init_array :
- {
- PROVIDE_HIDDEN (__init_array_start = .);
- KEEP (*(SORT(.init_array.*)))
- KEEP (*(.init_array*))
- PROVIDE_HIDDEN (__init_array_end = .);
- } >FLASH
- .fini_array :
- {
- PROVIDE_HIDDEN (__fini_array_start = .);
- KEEP (*(SORT(.fini_array.*)))
- KEEP (*(.fini_array*))
- PROVIDE_HIDDEN (__fini_array_end = .);
- } >FLASH
-
- /* used by the startup to initialize data */
- _sidata = LOADADDR(.data);
-
- /* Initialized data sections goes into RAM, load LMA copy after code */
- .data :
- {
- . = ALIGN(4);
- _sdata = .; /* create a global symbol at data start */
- *(.data) /* .data sections */
- *(.data*) /* .data* sections */
-
- . = ALIGN(4);
- _edata = .; /* define a global symbol at data end */
- } >RAM1 AT> FLASH
-
-
- /* Uninitialized data section */
- . = ALIGN(4);
- .bss :
- {
- /* This is used by the startup in order to initialize the .bss section */
- _sbss = .; /* define a global symbol at bss start */
- __bss_start__ = _sbss;
- *(.bss)
- *(.bss*)
- *(COMMON)
-
- . = ALIGN(4);
- _ebss = .; /* define a global symbol at bss end */
- __bss_end__ = _ebss;
- } >RAM1
-
- /* User_heap_stack section, used to check that there is enough RAM left */
- ._user_heap_stack :
- {
- . = ALIGN(8);
- PROVIDE ( end = . );
- PROVIDE ( _end = . );
- . = . + _Min_Heap_Size;
- . = . + _Min_Stack_Size;
- . = ALIGN(8);
- } >RAM1
-
-
-
- /* Remove information from the standard libraries */
- /DISCARD/ :
- {
- libc.a ( * )
- libm.a ( * )
- libgcc.a ( * )
- }
-
- .ARM.attributes 0 : { *(.ARM.attributes) }
- MAPPING_TABLE (NOLOAD) : { *(MAPPING_TABLE) } >RAM_SHARED
- MB_MEM1 (NOLOAD) : { *(MB_MEM1) } >RAM_SHARED
- MB_MEM2 (NOLOAD) : { _sMB_MEM2 = . ; *(MB_MEM2) ; _eMB_MEM2 = . ; } >RAM_SHARED
-}
-
-
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/lcd.c b/Projects/STM32WB5MM-DK/Examples/BSP/Src/lcd.c
deleted file mode 100644
index 56e8462eb..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/lcd.c
+++ /dev/null
@@ -1,223 +0,0 @@
-/**
- ******************************************************************************
- * @file lcd.c
- * @author MCD Application Team
- * @brief This example code shows how to use the lcd supported by the
- * STM32WB55MM-DK board
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2020-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Includes ------------------------------------------------------------------*/
-#include "main.h"
-#include "stlogo.h"
-
-/** @addtogroup STM32WBxx_HAL_Examples
- * @{
- */
-
-/** @addtogroup BSP
- * @{
- */
-
-/* Private typedef -----------------------------------------------------------*/
-
-/* Private define ------------------------------------------------------------*/
-#define LCD_FEATURES_NUM 4
-/* Private macro -------------------------------------------------------------*/
-/* Private variables ---------------------------------------------------------*/
-extern __IO uint32_t ButtonState;
-static uint8_t LCD_Feature = 0;
-/* Private function prototypes -----------------------------------------------*/
-static void LCD_Show_Feature(uint8_t feature);
-
-/* Private functions ---------------------------------------------------------*/
-
-/**
- * @brief LCD demo
- * @param None
- * @retval None
- */
-void LCD_demo (void)
-{
- LCD_Feature = 0;
- LCD_Show_Feature (LCD_Feature);
-
- while (1)
- {
- if(++LCD_Feature < LCD_FEATURES_NUM)
- {
- LCD_Show_Feature (LCD_Feature);
- }
- else
- {
- return;
- }
- if(CheckForUserInput() > 0)
- {
- ButtonState = 0;
- BSP_LCD_ScrollingStop(0);
- return;
- }
- }
-}
-
-/**
- * @brief Show LCD Features
- * @param feature : feature index
- * @retval None
- */
-static void LCD_Show_Feature(uint8_t feature)
-{
- Point Points[]= {{70, 40}, {120, 50}, {60, 60}};
- Point Points2[5];
- uint32_t x_size, y_size;
-
- BSP_LCD_GetXSize(0, &x_size);
- BSP_LCD_GetYSize(0, &y_size);
- Points2[0].X = 10;
- Points2[0].Y = 10;
- Points2[1].X = 30;
- Points2[1].Y = 30;
- Points2[2].X = 50;
- Points2[2].Y = 50;
- Points2[3].X = 80;
- Points2[3].Y = 20;
- Points2[4].X = 30;
- Points2[4].Y = 60;
-
- UTIL_LCD_SetFuncDriver(&LCD_Driver); /* SetFunc before setting device */
- UTIL_LCD_SetDevice(0); /* SetDevice after funcDriver is set */
- BSP_LCD_DisplayOn(0);
-
- UTIL_LCD_SetFont(&Font12);
- /* Set the LCD Text Color */
- UTIL_LCD_SetTextColor(SSD1315_COLOR_WHITE);
- UTIL_LCD_SetBackColor(SSD1315_COLOR_BLACK);
- BSP_LCD_Clear(0,SSD1315_COLOR_BLACK);
- BSP_LCD_Refresh(0);
-
- switch (feature)
- {
- case 0:
- /* Text Feature */
- BSP_LCD_Clear(0,SSD1315_COLOR_BLACK);
- BSP_LCD_Refresh(0);
- UTIL_LCD_DisplayStringAt(0, 0, (uint8_t *)"Text features", CENTER_MODE);
- UTIL_LCD_DrawRect(0, 0, 127 , 11, SSD1315_COLOR_WHITE);
- BSP_LCD_Refresh(0);
- HAL_Delay(2000);
-
- UTIL_LCD_SetFont(&Font12);
- UTIL_LCD_DisplayStringAt(0, 10, (uint8_t *)"Left", LEFT_MODE);
- BSP_LCD_Refresh(0);
- HAL_Delay(500);
- UTIL_LCD_DisplayStringAt(0, 20, (uint8_t *)"Center", CENTER_MODE);
- BSP_LCD_Refresh(0);
- HAL_Delay(500);
- UTIL_LCD_DisplayStringAt(0, 30, (uint8_t*)"Right", RIGHT_MODE);
- BSP_LCD_Refresh(0);
- HAL_Delay(500);
- UTIL_LCD_SetFont(&Font16);
- UTIL_LCD_DisplayStringAt(0, 40, (uint8_t *)"Font16", LEFT_MODE);
- BSP_LCD_Refresh(0);
- HAL_Delay(500);
- UTIL_LCD_SetFont(&Font12);
- UTIL_LCD_DisplayStringAt(60, 50, (uint8_t *)"Font12", LEFT_MODE);
- BSP_LCD_Refresh(0);
- HAL_Delay(500);
- UTIL_LCD_SetFont(&Font8);
- UTIL_LCD_DisplayStringAt(100, 58, (uint8_t *)"Font8", LEFT_MODE);
- BSP_LCD_Refresh(0);
- UTIL_LCD_SetFont(&Font12);
- HAL_Delay(2000);
- break;
-
- case 1:
- UTIL_LCD_DisplayStringAt(0, 30, (uint8_t *)"Draw features", CENTER_MODE);
- UTIL_LCD_DrawRect(0, 30, 127 , 11, SSD1315_COLOR_WHITE);
- BSP_LCD_Refresh(0);
- HAL_Delay(2000);
- BSP_LCD_Clear(0,SSD1315_COLOR_BLACK);
- BSP_LCD_Refresh(0);
- UTIL_LCD_FillPolygon(Points, 3, SSD1315_COLOR_WHITE);
- UTIL_LCD_DrawPolygon(Points2, 5, SSD1315_COLOR_WHITE);
- UTIL_LCD_DrawRect(0, 0, x_size , y_size - 1, SSD1315_COLOR_WHITE);
- UTIL_LCD_FillRect(82, 10, 20 , 20, SSD1315_COLOR_WHITE);
- UTIL_LCD_DrawCircle(45, 10, 2, SSD1315_COLOR_WHITE);
- UTIL_LCD_FillCircle(55, 10, 3, SSD1315_COLOR_WHITE);
- BSP_LCD_Refresh(0);
- HAL_Delay(3000);
- break;
-
- case 2:
- /* Draw Bitmap */
- BSP_LCD_Clear(0,SSD1315_COLOR_BLACK);
- BSP_LCD_Refresh(0);
- UTIL_LCD_DisplayStringAt(0, 30, (uint8_t *)"Draw Bitmap", CENTER_MODE);
- UTIL_LCD_DrawRect(0, 30, 127 , 11, SSD1315_COLOR_WHITE);
- BSP_LCD_Refresh(0);
- HAL_Delay(2000);
- BSP_LCD_Clear(0,SSD1315_COLOR_BLACK);
- BSP_LCD_Refresh(0);
- BSP_LCD_DrawBitmap(0, 0, 0, (uint8_t *)stlogo);
- BSP_LCD_Refresh(0);
- HAL_Delay(3000);
- break;
-
- case 3:
- /* Scrolling feature */
- BSP_LCD_Clear(0,SSD1315_COLOR_BLACK);
- BSP_LCD_Refresh(0);
- UTIL_LCD_DisplayStringAt(0, 0, (uint8_t *)"Scroll feature", CENTER_MODE);
- UTIL_LCD_DrawRect(0, 0, 127 , 11, SSD1315_COLOR_WHITE);
- BSP_LCD_Refresh(0);
- HAL_Delay(3000);
- UTIL_LCD_DisplayStringAt(0, 12, (uint8_t *)"scrolling Left", CENTER_MODE);
- BSP_LCD_Refresh(0);
- BSP_LCD_ScrollingStart(0);
- UTIL_LCD_DisplayStringAtLine(3, (uint8_t*)"<---");
- UTIL_LCD_DisplayStringAtLine(4, (uint8_t*)"<---");
- UTIL_LCD_DisplayStringAtLine(2, (uint8_t*)"<---");
- BSP_LCD_Refresh(0);
- BSP_LCD_ScrollingSetup(0,SSD1315_SCROLL_LEFT, 3, 7, SSD1315_SCROLL_FREQ_25FRAMES);
- BSP_LCD_Refresh(0);
- HAL_Delay(3000);
-
- BSP_LCD_Clear(0,SSD1315_COLOR_BLACK);
- BSP_LCD_Refresh(0);
- UTIL_LCD_DisplayStringAt(0, 0, (uint8_t *)"Scroll feature", CENTER_MODE);
- UTIL_LCD_DrawRect(0, 0, 127 , 11, SSD1315_COLOR_WHITE);
- BSP_LCD_Refresh(0);
- UTIL_LCD_DisplayStringAt(0, 12, (uint8_t *)"scrolling right", CENTER_MODE);
- BSP_LCD_Refresh(0);
- BSP_LCD_ScrollingStart(0);
- UTIL_LCD_DisplayStringAtLine(3, (uint8_t*)"--->");
- UTIL_LCD_DisplayStringAtLine(4, (uint8_t*)"--->");
- UTIL_LCD_DisplayStringAtLine(2, (uint8_t*)"--->");
- BSP_LCD_Refresh(0);
- BSP_LCD_ScrollingSetup(0,SSD1315_SCROLL_RIGHT, 3, 7, SSD1315_SCROLL_FREQ_25FRAMES);
- BSP_LCD_Refresh(0);
- HAL_Delay(3000);
- BSP_LCD_ScrollingStop(0);
- break;
- }
-}
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/led.c b/Projects/STM32WB5MM-DK/Examples/BSP/Src/led.c
deleted file mode 100644
index 395551448..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/led.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- ******************************************************************************
- * @file led.c
- * @author MCD Application Team
- * @brief This example code shows how to use the led supported by the
- * STM32WB55MM-DK board
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2020-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Includes ------------------------------------------------------------------*/
-#include "main.h"
-#include "stm32wb5mm_dk_bus.h"
-
-/** @addtogroup STM32WBxx_HAL_Examples
- * @{
- */
-
-/** @addtogroup BSP
- * @{
- */
-
-/* Private typedef -----------------------------------------------------------*/
-aPwmLedGsData_TypeDef aPwmLedGsData;
-GPIO_InitTypeDef GPIO_InitStructure;
-
-/* Private define ------------------------------------------------------------*/
-
-/* Private macro -------------------------------------------------------------*/
-/* Private variables ---------------------------------------------------------*/
-extern __IO uint32_t ButtonState;
-/* Private function prototypes -----------------------------------------------*/
-/* Private functions ---------------------------------------------------------*/
-
-/**
- * @brief demo of led.
- */
-void Led_demo(void)
-{
- ButtonState = 0;
- //printf("Press User button 1 to start the test\n");
- UTIL_LCD_Clear(UTIL_LCD_COLOR_WHITE);
- UTIL_LCD_DisplayStringAt(0, 16, (uint8_t *)"Led demo", CENTER_MODE);
- UTIL_LCD_DrawRect(0, 16, 127 , 11, SSD1315_COLOR_WHITE);
- UTIL_LCD_DisplayStringAt(0, 40, (uint8_t *)"Press user button1", CENTER_MODE);
- UTIL_LCD_DisplayStringAt(0, 52, (uint8_t *)"to skip LED demo", CENTER_MODE);
- BSP_LCD_Refresh(0);
- HAL_Delay(2000);
- /* Configure the PWM LED */
- BSP_PWM_LED_Init();
- /* PWM LED BSP Test sequence */
- /* Turn on Red led */
- aPwmLedGsData[PWM_LED_RED] = PWM_LED_GSDATA_7_0;
- aPwmLedGsData[PWM_LED_GREEN] = PWM_LED_GSDATA_OFF;
- aPwmLedGsData[PWM_LED_BLUE] = PWM_LED_GSDATA_OFF;
- BSP_PWM_LED_On(aPwmLedGsData);
- HAL_Delay(2000);
- BSP_PWM_LED_Off();
- HAL_Delay(1000);
-
- /* Turn on Green led */
- aPwmLedGsData[PWM_LED_RED] = PWM_LED_GSDATA_OFF;
- aPwmLedGsData[PWM_LED_GREEN] = PWM_LED_GSDATA_7_0;
- aPwmLedGsData[PWM_LED_BLUE] = PWM_LED_GSDATA_OFF;
- BSP_PWM_LED_On(aPwmLedGsData);
- HAL_Delay(2000);
- BSP_PWM_LED_Off();
- HAL_Delay(1000);
-
- /* Turn on Blue led */
- aPwmLedGsData[PWM_LED_RED] = PWM_LED_GSDATA_OFF;
- aPwmLedGsData[PWM_LED_GREEN] = PWM_LED_GSDATA_OFF;
- aPwmLedGsData[PWM_LED_BLUE] = PWM_LED_GSDATA_7_0;
- BSP_PWM_LED_On(aPwmLedGsData);
- HAL_Delay(2000);
- BSP_PWM_LED_Off();
- HAL_Delay(1000);
-
- aPwmLedGsData[PWM_LED_RED] = PWM_LED_GSDATA_OFF;
- aPwmLedGsData[PWM_LED_GREEN] = PWM_LED_GSDATA_7_0;
- aPwmLedGsData[PWM_LED_BLUE] = PWM_LED_GSDATA_OFF;
- BSP_PWM_LED_On(aPwmLedGsData);
- for (int i = 0 ; i < 10 ; i++)
- {
- HAL_Delay(500);
- BSP_PWM_LED_Toggle(aPwmLedGsData);
- }
- BSP_PWM_LED_Off();
-
- if (BSP_PWM_LED_GetState() == 0)
- {
- BSP_PWM_LED_On(aPwmLedGsData);
- HAL_Delay(2000);
- }
-
- if (BSP_PWM_LED_GetState() == 1)
- {
- BSP_PWM_LED_Off();
- }
- while (1)
- {
- if(CheckForUserInput() > 0)
- {
- ButtonState = 0;
- BSP_PWM_LED_DeInit();
-
- /* configure SPIx MOSI */
- GPIO_InitStructure.Pin = BUS_SPI1_MOSI_PIN;
- GPIO_InitStructure.Mode = GPIO_MODE_AF_PP;
- GPIO_InitStructure.Pull = GPIO_PULLDOWN;
- GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_LOW;
- GPIO_InitStructure.Alternate = BUS_SPI1_AF;
- HAL_GPIO_Init(BUS_SPI1_GPIO_PORTA, &GPIO_InitStructure);
- return;
- }
- }
-}
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/main.c b/Projects/STM32WB5MM-DK/Examples/BSP/Src/main.c
deleted file mode 100644
index 4fc6fb827..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/main.c
+++ /dev/null
@@ -1,289 +0,0 @@
-/**
- ******************************************************************************
- * @file main.c
- * @author MCD Application Team
- * @brief Main program body
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2020-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Includes ------------------------------------------------------------------*/
-#include "main.h"
-
-/** @addtogroup STM32WLxx_HAL_Examples
- * @{
- */
-
-/** @addtogroup BSP
- * @{
- */
-
-/* Private typedef -----------------------------------------------------------*/
-BSP_DemoTypedef BSP_examples[]=
-{
- {LCD_demo, "OLED SCREEN Demo", 0},
- {Temperature_Test, "Temperature Demo", 1},
- {Gyro_Test, "Gyroscope Demo", 2},
- {Accelero_Test, "Accelerometer Demo", 3},
- {Proximity_Test, "Proximity Demo", 4},
- {QSPI_demo, "QSPI Demo", 5},
- {Audio_Record_Demo, "Audio Record Demo", 6},
- {Led_demo, "Led Demo", 7}
-};
-/* Private define ------------------------------------------------------------*/
-/* Private macro -------------------------------------------------------------*/
-/* Private variables ---------------------------------------------------------*/
-uint8_t DemoIndex = 0;
-__IO uint32_t ButtonState = 0;
-__IO uint8_t NbLoop = 1;
-/* Exported variables --------------------------------------------------------*/
-
-/* Private function prototypes -----------------------------------------------*/
-static void SystemClock_Config(void);
-static void Display_DemoDescription(void);
-/* Private functions ---------------------------------------------------------*/
-
-/**
- * @brief Main program
- * @param None
- * @retval None
- */
-int main(void)
-{
- /* STM32WBxx HAL library initialization:
- - Configure the Flash prefetch, Flash preread and Buffer caches
- - Systick timer is configured by default as source of time base, but user
- can eventually implement his proper time base source (a general purpose
- timer for example or other time source), keeping in mind that Time base
- duration should be kept 1ms since PPP_TIMEOUT_VALUEs are defined and
- handled in milliseconds basis.
- - Low Level Initialization
- */
- HAL_Init();
-
- /* Configure the System clock to have a frequency of 48 MHz */
- SystemClock_Config();
-
- /* Configure the User Button 1 in EXTI Mode */
- BSP_PB_Init(BUTTON_USER1, BUTTON_MODE_EXTI);
- BSP_LCD_Init(0, LCD_ORIENTATION_LANDSCAPE);
- Display_DemoDescription();
-
- while (1)
- {
- if(ButtonState == 1)
- {
- HAL_Delay(400);
- ButtonState = 0;
- BSP_examples[DemoIndex++].DemoFunc();
-
- HAL_Delay(100);
-
- if(DemoIndex >= COUNT_OF_EXAMPLE(BSP_examples))
- {
- NbLoop++;
- DemoIndex = 0;
- }
- Display_DemoDescription();
- }
- }
-}
-
-/**
- * @brief System Clock Configuration
- * @param None
- * @retval None
- */
-static void SystemClock_Config(void)
-{
- RCC_OscInitTypeDef RCC_OscInitStruct = {0};
- RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
- RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
-
- /** Initializes the CPU, AHB and APB busses clocks
- */
- RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48|RCC_OSCILLATORTYPE_HSI
- |RCC_OSCILLATORTYPE_HSE;
- RCC_OscInitStruct.HSEState = RCC_HSE_ON;
- RCC_OscInitStruct.HSIState = RCC_HSI_ON;
- RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
- RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
- RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
- RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
- RCC_OscInitStruct.PLL.PLLM = RCC_PLLM_DIV8;
- RCC_OscInitStruct.PLL.PLLN = 32;
- RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
- RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2;
- RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2;
- if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
- {
- Error_Handler();
- }
- /** Configure the SYSCLKSource, HCLK, PCLK1 and PCLK2 clocks dividers
- */
- RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK4|RCC_CLOCKTYPE_HCLK2
- |RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
- |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
- RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
- RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
- RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
- RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
- RCC_ClkInitStruct.AHBCLK2Divider = RCC_SYSCLK_DIV2;
- RCC_ClkInitStruct.AHBCLK4Divider = RCC_SYSCLK_DIV1;
-
- if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_3) != HAL_OK)
- {
- Error_Handler();
- }
- /** Initializes the peripherals clocks
- */
- PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_SAI1|RCC_PERIPHCLK_USB;
-
- PeriphClkInitStruct.PLLSAI1.PLLN = 86;
- PeriphClkInitStruct.PLLSAI1.PLLP = RCC_PLLP_DIV7;
- PeriphClkInitStruct.PLLSAI1.PLLQ = RCC_PLLQ_DIV2;
- PeriphClkInitStruct.PLLSAI1.PLLR = RCC_PLLR_DIV2;
- PeriphClkInitStruct.PLLSAI1.PLLSAI1ClockOut = RCC_PLLSAI1_SAI1CLK;
- PeriphClkInitStruct.Sai1ClockSelection = RCC_SAI1CLKSOURCE_PLLSAI1;
- PeriphClkInitStruct.UsbClockSelection = RCC_USBCLKSOURCE_HSI48;
-
- if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
- {
- Error_Handler();
- }
-
- HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/1000);
- HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK);
- HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0);
- HAL_PWREx_EnableVddUSB();
-}
-
-/**
- * @brief Display main demo messages
- * @param None
- * @retval None
- */
-static void Display_DemoDescription(void)
-{
- char desc[64];
- uint32_t x_size;
- uint32_t y_size;
-
- /* Set LCD Foreground Layer */
- UTIL_LCD_SetFuncDriver(&LCD_Driver); /* SetFunc before setting device */
- UTIL_LCD_SetDevice(0); /* SetDevice after funcDriver is set */
- BSP_LCD_Clear(0,SSD1315_COLOR_BLACK);
- BSP_LCD_DisplayOn(0);
- BSP_LCD_Refresh(0);
-
- BSP_LCD_GetXSize(0, &x_size);
- BSP_LCD_GetYSize(0, &y_size);
- UTIL_LCD_SetFont(&Font12);
-
- /* Set the LCD Text Color */
- UTIL_LCD_SetTextColor(SSD1315_COLOR_WHITE);
- UTIL_LCD_SetBackColor(SSD1315_COLOR_BLACK);
- UTIL_LCD_DisplayStringAt(0, 0, (uint8_t *)"STM32WB5MM-DK", CENTER_MODE);
- BSP_LCD_Refresh(0);
- HAL_Delay(1000);
-
- UTIL_LCD_DisplayStringAt(0, 12, (uint8_t *)"Press user button1", CENTER_MODE);
- UTIL_LCD_DisplayStringAt(0, 24, (uint8_t *)"to start :", CENTER_MODE);
- sprintf(desc,"%s", BSP_examples[DemoIndex].DemoName);
- UTIL_LCD_DisplayStringAt(0, 36, (uint8_t *)desc, CENTER_MODE);
- UTIL_LCD_DisplayStringAt(0, 48, (uint8_t *)"example", CENTER_MODE);
- BSP_LCD_Refresh(0);
-}
-
-/**
- * @brief Gets numeric values from the Hyperterminal.
- * @param Maximum value allowed (value)
- * @retval The character received
- */
-uint32_t Serial_Scanf(uint32_t value)
-{
- uint16_t tmp = 0;
-
- tmp = getchar();
- while ( getchar() != '\n' );
-
- if (tmp > value)
- {
- printf("\n\r !!! Please enter valid number between 0 and %lu \n", value);
- return 0xFF;
- }
- return tmp;
-}
-
-/**
- * @brief Check for user input
- * @param None
- * @retval Input state (1 : active / 0 : Inactive)
- */
-uint8_t CheckForUserInput(void)
-{
- return ButtonState;
-}
-
-/**
- * @brief Button Callback
- * @param Button Specifies the pin connected EXTI line
- * @retval None
- */
-void BSP_PB_Callback(Button_TypeDef Button)
-{
- if(Button == BUTTON_USER1)
- {
- ButtonState = 1;
- }
-}
-
-/**
- * @brief This function is executed in case of error occurrence.
- * @param None
- * @retval None
- */
-void Error_Handler(void)
-{
- while(1)
- {
- }
-}
-
-#ifdef USE_FULL_ASSERT
-
-/**
- * @brief Reports the name of the source file and the source line number
- * where the assert_param error has occurred.
- * @param file: pointer to the source file name
- * @param line: assert_param error line source number
- * @retval None
- */
-void assert_failed(uint8_t* file, uint32_t line)
-{
- /* User can add his own implementation to report the file name and line number,
- ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
-
- /* Infinite loop */
- while (1)
- {
- }
-}
-#endif
-
-/**
- * @}
- */
-
-/**
- * @}
- */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/proximity.c b/Projects/STM32WB5MM-DK/Examples/BSP/Src/proximity.c
deleted file mode 100644
index ff60180c7..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/proximity.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- ******************************************************************************
-* @file proximity.c
-* @author MCD Application Team
-* @brief This example code shows how to use the TOF sensor supported by the
-* STM32WB5MM-DK board
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2020-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Includes ------------------------------------------------------------------*/
-#include "main.h"
-#include "stm32wb5mm_dk_bus.h"
-
-#include "vl53l0x_def.h"
-#include "vl53l0x_api.h"
-#include "vl53l0x_tof.h"
-
-/** @addtogroup STM32WBxx_HAL_Examples
-* @{
-*/
-
-/** @addtogroup BSP
-* @{
-*/
-
-/* Private typedef -----------------------------------------------------------*/
-/* Private define ------------------------------------------------------------*/
-#define PROXIMITY_I2C_ADDRESS 0x53U
-#define VL53L0X_ID 0xEEAAU
-#define VL53L0X_XSHUT_PIN GPIO_PIN_6
-#define VL53L0X_XSHUT_GPIO_PORT GPIOB
-#define VL53L0X_XSHUT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
-#define VL53L0X_XSHUT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOB_CLK_DISABLE()
-
-/* Private macro -------------------------------------------------------------*/
-/* Private variables ---------------------------------------------------------*/
-static VL53L0X_Dev_t Dev =
-{
- .I2cHandle = &hbus_i2c3,
- .I2cDevAddr = PROXIMITY_I2C_ADDRESS
-};
-
-/* Private function prototypes -----------------------------------------------*/
-static void VL53L0X_PROXIMITY_Init(void);
-static uint16_t VL53L0X_PROXIMITY_GetDistance(void);
-static void VL53L0X_PROXIMITY_MspInit(void);
-
-/* Private functions ---------------------------------------------------------*/
-
-/**
- * @brief Test of VL53L0X sensor.
- */
-void Proximity_Test(void)
-{
- char prox[64];
- uint16_t proximity;
- proximity = 0;
-
- VL53L0X_PROXIMITY_Init();
- while (1)
- {
- BSP_LCD_Clear(0,SSD1315_COLOR_BLACK);
- BSP_LCD_Refresh(0);
- UTIL_LCD_DisplayStringAt(0, 0, (uint8_t *)"Proximity Measure ", CENTER_MODE);
- UTIL_LCD_DrawRect(0, 0, 127 , 11, SSD1315_COLOR_WHITE);
- BSP_LCD_Refresh(0);
- proximity = VL53L0X_PROXIMITY_GetDistance();
- sprintf(prox,"proximity=%d mm", proximity);
- UTIL_LCD_DisplayStringAt(0, 37, (uint8_t *)prox, LEFT_MODE);
- BSP_LCD_Refresh(0);
- HAL_Delay(500);
- if(CheckForUserInput() > 0)
- {
- ButtonState = 0;
- return;
- }
- }
-}
-
-/**
- * @brief VL53L0X proximity sensor Initialization.
- */
-static void VL53L0X_PROXIMITY_Init(void)
-{
- uint16_t vl53l0x_id = 0;
- VL53L0X_DeviceInfo_t VL53L0X_DeviceInfo;
-
- /* Initialize IO interface */
- STM32WB5MM_DK_I2C_Init();
-
- VL53L0X_PROXIMITY_MspInit();
-
- memset(&VL53L0X_DeviceInfo, 0, sizeof(VL53L0X_DeviceInfo_t));
-
- if (VL53L0X_ERROR_NONE == VL53L0X_GetDeviceInfo(&Dev, &VL53L0X_DeviceInfo))
- {
- if (VL53L0X_ERROR_NONE == VL53L0X_RdWord(&Dev, VL53L0X_REG_IDENTIFICATION_MODEL_ID, (uint16_t *) &vl53l0x_id))
- {
- if (vl53l0x_id == VL53L0X_ID)
- {
- if (VL53L0X_ERROR_NONE == VL53L0X_DataInit(&Dev))
- {
- Dev.Present = 1;
- SetupSingleShot(Dev);
- }
- else
- {
- printf("VL53L0X Time of Flight Failed to send its ID!\n");
- }
- }
- }
- else
- {
- printf("VL53L0X Time of Flight Failed to Initialize!\n");
- }
- }
- else
- {
- printf("VL53L0X Time of Flight Failed to get infos!\n");
- }
-}
-
-/**
- * @brief Get distance from VL53L0X proximity sensor.
- * @retval Distance in mm
- */
-static uint16_t VL53L0X_PROXIMITY_GetDistance(void)
-{
- VL53L0X_RangingMeasurementData_t RangingMeasurementData;
-
- VL53L0X_PerformSingleRangingMeasurement(&Dev, &RangingMeasurementData);
-
- return RangingMeasurementData.RangeMilliMeter;
-}
-
-/**
- * @brief VL53L0X proximity sensor Msp Initialization.
- */
-static void VL53L0X_PROXIMITY_MspInit(void)
-{
- GPIO_InitTypeDef gpio_config = {0};
-
- VL53L0X_XSHUT_GPIO_CLK_ENABLE();
-
- /* Configure GPIO pin : VL53L0X_XSHUT_PIN */
- gpio_config.Pin = VL53L0X_XSHUT_PIN;
- gpio_config.Mode = GPIO_MODE_OUTPUT_PP;
- gpio_config.Pull = GPIO_PULLUP;
- gpio_config.Speed = GPIO_SPEED_FREQ_HIGH;
- HAL_GPIO_Init(VL53L0X_XSHUT_GPIO_PORT, &gpio_config);
-
- HAL_GPIO_WritePin(VL53L0X_XSHUT_GPIO_PORT, VL53L0X_XSHUT_PIN, GPIO_PIN_SET);
-
- HAL_Delay(1000);
-}
-/**
- * @}
- */
-
-/**
- * @}
- */
-
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/qspi.c b/Projects/STM32WB5MM-DK/Examples/BSP/Src/qspi.c
deleted file mode 100644
index 269e8335e..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/qspi.c
+++ /dev/null
@@ -1,322 +0,0 @@
-/**
- ******************************************************************************
- * @file qspi.c
- * @author MCD Application Team
- * @brief This example code shows how to use the qspi supported by the
- * STM32WB55MM-DK board
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2020-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Includes ------------------------------------------------------------------*/
-#include "main.h"
-
-/** @addtogroup STM32WBxx_HAL_Examples
- * @{
- */
-
-/** @addtogroup BSP
- * @{
- */
-
-/* Private typedef -----------------------------------------------------------*/
-/* Private define ------------------------------------------------------------*/
-#define BUFFER_SIZE ((uint32_t)0x0200)
-#define WRITE_READ_ADDR ((uint32_t)0x0050)
-
-/* Private macro -------------------------------------------------------------*/
-/* Private variables ---------------------------------------------------------*/
-extern __IO uint32_t ButtonState;
-uint8_t qspi_aTxBuffer[BUFFER_SIZE];
-uint8_t qspi_aRxBuffer[BUFFER_SIZE];
-uint8_t qspi_eraseBuffer[BUFFER_SIZE];
-
-/* Private function prototypes -----------------------------------------------*/
-static void Fill_Buffer (uint8_t *pBuffer, uint32_t uwBufferLength, uint32_t uwOffset);
-static uint8_t Buffercmp (uint8_t* pBuffer1, uint8_t* pBuffer2, uint32_t BufferLength);
-
-/* Private functions ---------------------------------------------------------*/
-/**
- * @brief demo of qspi.
- */
-void QSPI_demo (void)
-{
- /* QSPI info structure */
- BSP_QSPI_Info_t pQSPI_Info;
- uint8_t status;
- S25FL128S_Interface_t Tab[3]={S25FL128S_SPI_MODE, S25FL128S_SPI_1I2O_MODE, S25FL128S_SPI_4IO_MODE};
- char* Tab1[3]={"SPI MODE", "SPI 1I2O MODE", "SPI 4IO MODE"};
-
- /*##-1- Configure the QSPI device ##########################################*/
- /* QSPI device configuration */
- BSP_LCD_Clear(0,SSD1315_COLOR_BLACK);
- BSP_LCD_Refresh(0);
-
- UTIL_LCD_DisplayStringAt(0, 0, (uint8_t*)"QSPI Tests", CENTER_MODE);
- UTIL_LCD_DrawRect(0, 0, 127 , 11, SSD1315_COLOR_WHITE);
- UTIL_LCD_DisplayStringAt(0, 15, (uint8_t*)"This example shows", CENTER_MODE);
- UTIL_LCD_DisplayStringAt(0, 27, (uint8_t*)"how to write and", CENTER_MODE);
- UTIL_LCD_DisplayStringAt(0, 39, (uint8_t*)"read data on QSPI", CENTER_MODE);
- UTIL_LCD_DisplayStringAt(0, 51, (uint8_t*)"memory", CENTER_MODE);
-
- BSP_LCD_Refresh(0);
- HAL_Delay(5000);
- BSP_LCD_Clear(0,SSD1315_COLOR_BLACK);
- BSP_LCD_Refresh(0);
-
- BSP_QSPI_Init_t init ;
- init.TransferRate= S25FL128S_STR_TRANSFER ;
- init.DualFlashMode= S25FL128S_DUALFLASH_DISABLE;
-
- for(int i=0; i<3; i++)
- {
- if(CheckForUserInput() > 0)
- {
- ButtonState = 0;
- return;
- }
- init.InterfaceMode = Tab[i];
- status = BSP_QSPI_Init(0,&init);
-
- UTIL_LCD_DisplayStringAt(0, 30, (uint8_t*)Tab1[i], CENTER_MODE);
- UTIL_LCD_DrawRect(0, 30, 127 , 11, SSD1315_COLOR_WHITE);
- BSP_LCD_Refresh(0);
- HAL_Delay(2000);
- BSP_LCD_Clear(0,SSD1315_COLOR_BLACK);
- BSP_LCD_Refresh(0);
-
- if (status != BSP_ERROR_NONE)
- {
- UTIL_LCD_DisplayStringAt(0, 0, (uint8_t*)"QSPI Init:FAILED", LEFT_MODE);
- BSP_LCD_Refresh(0);
- }
-
- else
- {
- UTIL_LCD_DisplayStringAt(0, 0, (uint8_t*)"QSPI Init:OK", LEFT_MODE);
- BSP_LCD_Refresh(0);
- HAL_Delay(500);
-
- /*##-2- Read & check the QSPI info #######################################*/
- /* Initialize the structure */
- pQSPI_Info.FlashSize = (uint32_t)0x00;
- pQSPI_Info.EraseSectorSize = (uint32_t)0x00;
- pQSPI_Info.EraseSectorsNumber = (uint32_t)0x00;
- pQSPI_Info.ProgPageSize = (uint32_t)0x00;
- pQSPI_Info.ProgPagesNumber = (uint32_t)0x00;
-
- /* Read the QSPI memory info */
- BSP_QSPI_GetInfo(0,&pQSPI_Info);
-
- /* Test the correctness */
- if((pQSPI_Info.FlashSize != 0x1000000) || (pQSPI_Info.EraseSectorSize != 0x1000) ||
- (pQSPI_Info.ProgPageSize != 0x100) || (pQSPI_Info.EraseSectorsNumber != 0x1000) ||
- (pQSPI_Info.ProgPagesNumber != 0x10000))
- {
-
- UTIL_LCD_DisplayStringAt(0, 16, (uint8_t*)"QSPI GET INFO:FAILED", LEFT_MODE);
- BSP_LCD_Refresh(0);
- }
- else
- {
- UTIL_LCD_DisplayStringAt(0, 16, (uint8_t*)"QSPI GET INFO:OK", LEFT_MODE);
- BSP_LCD_Refresh(0);
- HAL_Delay(500);
- /*##-3- Erase QSPI memory ################################################*/
- if(BSP_QSPI_EraseBlock(0,WRITE_READ_ADDR,S25FL128S_ERASE_64K) != BSP_ERROR_NONE)
- {
- UTIL_LCD_DisplayStringAt(0, 32, (uint8_t*)"QSPI ERASE:FAILED", LEFT_MODE);
- BSP_LCD_Refresh(0);
- }
- else
- {
- UTIL_LCD_DisplayStringAt(0, 32, (uint8_t*)"QSPI ERASE:OK", LEFT_MODE);
- BSP_LCD_Refresh(0);
- HAL_Delay(500);
- /*##-4- QSPI memory read/write access #################################*/
- /* Fill the buffer to write */
- Fill_Buffer(qspi_aTxBuffer, BUFFER_SIZE, 0xD20F);
-
- /* Write data to the QSPI memory */
- if(BSP_QSPI_Write(0,qspi_aTxBuffer, WRITE_READ_ADDR, BUFFER_SIZE) != BSP_ERROR_NONE)
- {
- UTIL_LCD_DisplayStringAt(0, 48, (uint8_t*)"QSPI WRITE:FAILED", LEFT_MODE);
- BSP_LCD_Refresh(0);
- }
- else
- {
- UTIL_LCD_DisplayStringAt(0, 48, (uint8_t*)"QSPI WRITE:OK", LEFT_MODE);
- BSP_LCD_Refresh(0);
- HAL_Delay(500);
- BSP_LCD_Clear(0,SSD1315_COLOR_BLACK);
- BSP_LCD_Refresh(0);
-
- /* Read back data from the QSPI memory */
- if(BSP_QSPI_Read(0,qspi_aRxBuffer, WRITE_READ_ADDR, BUFFER_SIZE) != BSP_ERROR_NONE)
- {
- UTIL_LCD_DisplayStringAt(0, 0, (uint8_t*)"QSPI READ:FAILED", LEFT_MODE);
- BSP_LCD_Refresh(0);
- }
- else
- {
- UTIL_LCD_DisplayStringAt(0, 0, (uint8_t*)"QSPI READ:OK", LEFT_MODE);
- BSP_LCD_Refresh(0);
- HAL_Delay(500);
-
- /*##-5- Checking data integrity ############################################*/
- if(Buffercmp(qspi_aRxBuffer, qspi_aTxBuffer, BUFFER_SIZE) > 0)
- {
- UTIL_LCD_DisplayStringAt(0, 16, (uint8_t*)"QSPI COMPARE:FAILED", LEFT_MODE);
- BSP_LCD_Refresh(0);
- }
- else
- {
- UTIL_LCD_DisplayStringAt(0, 16, (uint8_t*)"QSPI COMPARE:OK", LEFT_MODE);
- BSP_LCD_Refresh(0);
- HAL_Delay(500);
- /*##-6- Erase QSPI memory ################################################*/
- if(BSP_QSPI_EraseBlock(0,WRITE_READ_ADDR,S25FL128S_ERASE_64K) != BSP_ERROR_NONE)
- {
- UTIL_LCD_DisplayStringAt(0, 32, (uint8_t*)"QSPI ERASE:FAILED", LEFT_MODE);
- BSP_LCD_Refresh(0);
- }
- else
- {
- UTIL_LCD_DisplayStringAt(0, 32, (uint8_t*)"QSPI ERASE:OK", LEFT_MODE);
- BSP_LCD_Refresh(0);
- HAL_Delay(500);
-
- /* Read back data from the QSPI memory */
- if(BSP_QSPI_Read(0,qspi_aRxBuffer, WRITE_READ_ADDR, BUFFER_SIZE) != BSP_ERROR_NONE)
- {
- UTIL_LCD_DisplayStringAt(0, 48, (uint8_t*)"QSPI READ:FAILED", LEFT_MODE);
- BSP_LCD_Refresh(0);
- }
- else
- {
- UTIL_LCD_DisplayStringAt(0, 48, (uint8_t*)"QSPI READ:OK", LEFT_MODE);
- BSP_LCD_Refresh(0);
- HAL_Delay(500);
- BSP_LCD_Clear(0,SSD1315_COLOR_BLACK);
- BSP_LCD_Refresh(0);
- }
- /*##-7- Fill erase Buffer ############################################*/
- for (int i=0; i < BUFFER_SIZE; i++)
- {
- qspi_eraseBuffer[i]= 0xff;
- }
- /*##-8- Checking data integrity ############################################*/
- if(Buffercmp(qspi_aRxBuffer, qspi_eraseBuffer, BUFFER_SIZE) > 0)
- {
- UTIL_LCD_DisplayStringAt(0, 0, (uint8_t*)"QSPI COMPARE:FAILED", LEFT_MODE);
- BSP_LCD_Refresh(0);
- }
- else
- {
- UTIL_LCD_DisplayStringAt(0, 0, (uint8_t*)"QSPI COMPARE:OK", LEFT_MODE);
- BSP_LCD_Refresh(0);
- HAL_Delay(500);
- }
- /*##-9-Enable Memory Mapped Mode ###############################################*/
- if(BSP_QSPI_EnableMemoryMappedMode(0)!=BSP_ERROR_NONE)
- {
- UTIL_LCD_DisplayStringAt(0, 16, (uint8_t*)"QSPI MMP:FAILED", LEFT_MODE);
- BSP_LCD_Refresh(0);
- }
- else
- {
- UTIL_LCD_DisplayStringAt(0, 16, (uint8_t*)"QSPI MMP:OK", LEFT_MODE);
- BSP_LCD_Refresh(0);
- HAL_Delay(500);
- }
- /*##-10- Disable Memory Mapped Mode ###############################################*/
- if(BSP_QSPI_DisableMemoryMappedMode(0)!=BSP_ERROR_NONE)
- {
- UTIL_LCD_DisplayStringAt(0, 32, (uint8_t*)"QSPI DMMP:FAILED", LEFT_MODE);
- BSP_LCD_Refresh(0);
- }
- else
- {
- UTIL_LCD_DisplayStringAt(0, 32, (uint8_t*)"QSPI DMMP:OK", LEFT_MODE);
- BSP_LCD_Refresh(0);
- HAL_Delay(500);
- BSP_LCD_Clear(0,SSD1315_COLOR_BLACK);
- BSP_LCD_Refresh(0);
- BSP_QSPI_DeInit(0);
- }
- }
- }
- }
- }
- }
- }
- }
-
- /* De-Initialization */
- status = BSP_QSPI_DeInit(0);
- if (status != BSP_ERROR_NONE)
- {
- UTIL_LCD_DisplayStringAt(0, 0, (uint8_t*)"QSPI DeInit:FAILED", LEFT_MODE);
- BSP_LCD_Refresh(0);
- }
- }
-}
-
-/**
- * @brief Fills buffer with user predefined data.
- * @param pBuffer: pointer on the buffer to fill
- * @param uwBufferLenght: size of the buffer to fill
- * @param uwOffset: first value to fill on the buffer
- * @retval None
- */
-static void Fill_Buffer(uint8_t *pBuffer, uint32_t uwBufferLenght, uint32_t uwOffset)
-{
- uint32_t tmpIndex = 0;
-
- /* Put in global buffer different values */
- for (tmpIndex = 0; tmpIndex < uwBufferLenght; tmpIndex++ )
- {
- pBuffer[tmpIndex] = tmpIndex + uwOffset;
- }
-}
-
-/**
- * @brief Compares two buffers.
- * @param pBuffer1, pBuffer2: buffers to be compared.
- * @param BufferLength: buffer's length
- * @retval 1: pBuffer identical to pBuffer1
- * 0: pBuffer differs from pBuffer1
- */
-static uint8_t Buffercmp(uint8_t* pBuffer1, uint8_t* pBuffer2, uint32_t BufferLength)
-{
- while (BufferLength--)
- {
- if (*pBuffer1 != *pBuffer2)
- {
- return 1;
- }
-
- pBuffer1++;
- pBuffer2++;
- }
-
- return 0;
-}
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/record.c b/Projects/STM32WB5MM-DK/Examples/BSP/Src/record.c
deleted file mode 100644
index 761a1227e..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/record.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/**
- ******************************************************************************
- * @file record.c
- * @author MCD Application Team
- * @brief Audio application.
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2020-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Includes ------------------------------------------------------------------*/
-#include "main.h"
-
-/* Private typedef -----------------------------------------------------------*/
-/* Private define ------------------------------------------------------------*/
-#define AUDIO_OUT_MS (20)
-#define AUDIO_OUT_SAMPLING_FREQUENCY 16000
-
-/* Private macro -------------------------------------------------------------*/
-/** @defgroup AUDIO_APPLICATION_Exported_Variables
- * @{
- */
-USBD_HandleTypeDef hUSBDDevice;
-extern USBD_AUDIO_ItfTypeDef USBD_AUDIO_fops;
-uint16_t PDM_Buffer[((((2 * AUDIO_IN_CHANNELS * AUDIO_IN_SAMPLING_FREQUENCY) / 1000) * MAX_DECIMATION_FACTOR) / 16)* N_MS_PER_INTERRUPT ];
-uint16_t PCM_Buffer[((AUDIO_IN_SAMPLING_FREQUENCY)/1000) * N_MS_PER_INTERRUPT ];
-BSP_AUDIO_Init_t MicParams;
-/**
- * @}
- */
-
-/* Private variables ---------------------------------------------------------*/
-/** @defgroup AUDIO_APPLICATION_Private_Variables
- * @{
- */
-/**
- * @}
- */
-
-/** @defgroup AUDIO_APPLICATION_Exported_Function
- * @{
- */
-static void Init_Acquisition_Peripherals(uint32_t AudioFreq, uint32_t ChnlNbrIn, uint32_t ChnlNbrOut);
-static void Start_Acquisition(void);
-static void AudioProcess(void);
-
-/**
- * @brief Audio Record Demo.
- */
-void Audio_Record_Demo(void)
-{
- BSP_LCD_Clear(0,SSD1315_COLOR_BLACK);
- BSP_LCD_Refresh(0);
- UTIL_LCD_DisplayStringAt(0, 0, (uint8_t *)"Audio Record ", CENTER_MODE);
- UTIL_LCD_DrawRect(0, 0, 127 , 11, SSD1315_COLOR_WHITE);
- UTIL_LCD_DisplayStringAt(0, 15, (uint8_t *)"Open Voice Recorder", CENTER_MODE);
- UTIL_LCD_DisplayStringAt(0, 27, (uint8_t *)"Application", CENTER_MODE);
- UTIL_LCD_DisplayStringAt(0, 40, (uint8_t *)"Press user button1", CENTER_MODE);
- UTIL_LCD_DisplayStringAt(0, 52, (uint8_t *)"to skip audio demo", CENTER_MODE);
- BSP_LCD_Refresh(0);
-
- /* Initialize USB descriptor basing on channels number and sampling frequency */
- USBD_AUDIO_Init_Microphone_Descriptor(&hUSBDDevice, AUDIO_OUT_SAMPLING_FREQUENCY, AUDIO_CHANNELS_OUT);
- /* Init Device Library */
- USBD_Init(&hUSBDDevice, &AUDIO_Desc, 0);
- /* Add Supported Class */
- USBD_RegisterClass(&hUSBDDevice, &USBD_AUDIO);
- /* Add Interface callbacks for AUDIO Class */
- USBD_AUDIO_RegisterInterface(&hUSBDDevice, &USBD_AUDIO_fops);
- /* Start Device Process */
- USBD_Start(&hUSBDDevice);
-
- /* Start audio acquisition and streaming */
-#ifdef DISABLE_USB_DRIVEN_ACQUISITION
- Init_Acquisition_Peripherals(AUDIO_IN_SAMPLING_FREQUENCY, AUDIO_IN_CHANNELS, 0);
- Start_Acquisition();
-#endif
- while (1)
- {
- if(CheckForUserInput() > 0)
- {
- ButtonState = 0;
- BSP_AUDIO_IN_Stop(BSP_AUDIO_INSTANCE);
- USBD_DeInit(&hUSBDDevice);
- BSP_AUDIO_IN_DeInit(BSP_AUDIO_INSTANCE);
-
- return;
- }
- }
-}
-
-/**
- * @brief Half Transfer user callback, called by BSP functions.
- * @param None
- * @retval None
- */
-void BSP_AUDIO_IN_HalfTransfer_CallBack(uint32_t Instance)
-{
- AudioProcess();
-}
-
-/**
- * @brief Transfer Complete user callback, called by BSP functions.
- * @param None
- * @retval None
- */
-void BSP_AUDIO_IN_TransferComplete_CallBack(uint32_t Instance)
-{
- AudioProcess();
-}
-
-/**
- * @brief User function that is called when 1 ms of PDM data is available.
- * In this application only PDM to PCM conversion and USB streaming
- * is performed.
- * User can add his own code here to perform some DSP or audio analysis.
- * @param none
- * @retval None
- */
-static void AudioProcess(void)
-{
- BSP_AUDIO_IN_PDMToPCM(BSP_AUDIO_INSTANCE, (uint16_t * )PDM_Buffer, (uint16_t*)PCM_Buffer);
- Send_Audio_to_USB((int16_t *)PCM_Buffer, ((AUDIO_IN_SAMPLING_FREQUENCY/1000)*N_MS_PER_INTERRUPT));
-}
-
-/**
- * @brief User function that is called when 1 ms of PDM data is available.
- * In this application only PDM to PCM conversion and USB streaming
- * is performed.
- * User can add his own code here to perform some DSP or audio analysis.
- * @param none
- * @retval None
- */
-static void Init_Acquisition_Peripherals(uint32_t AudioFreq, uint32_t ChnlNbrIn, uint32_t ChnlNbrOut)
-{
- MicParams.BitsPerSample = 16;
- MicParams.ChannelsNbr = ChnlNbrIn;
- MicParams.Device = AUDIO_IN_DIGITAL_MIC;
- MicParams.SampleRate = AudioFreq;
- MicParams.Volume = AUDIO_VOLUME_INPUT;
-
- if (BSP_AUDIO_IN_Init(BSP_AUDIO_INSTANCE, &MicParams)!=BSP_ERROR_NONE)
- {
- Error_Handler();
- }
-}
-
-/**
- * @brief User function that is called when 1 ms of PDM data is available.
- * In this application only PDM to PCM conversion and USB streaming
- * is performed.
- * User can add his own code here to perform some DSP or audio analysis.
- * @param none
- * @retval None
- */
-static void Start_Acquisition(void)
-{
- if (BSP_AUDIO_IN_Record(BSP_AUDIO_INSTANCE, (uint8_t *) PDM_Buffer, AUDIO_IN_BUFFER_SIZE)!=BSP_ERROR_NONE)
- {
- Error_Handler();
- }
-}
-
-/**
- * @}
- */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/sensors.c b/Projects/STM32WB5MM-DK/Examples/BSP/Src/sensors.c
deleted file mode 100644
index 028dfd058..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/sensors.c
+++ /dev/null
@@ -1,164 +0,0 @@
-/**
- ******************************************************************************
-* @file sensors.c
-* @author MCD Application Team
-* @brief This example code shows how to use the sensors supported by the
-* STM32WB55MM-DK board
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2020-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Includes ------------------------------------------------------------------*/
-#include "main.h"
-
-/** @addtogroup STM32WLxx_HAL_Examples
-* @{
-*/
-
-/** @addtogroup BSP
-* @{
-*/
-
-/* Private typedef -----------------------------------------------------------*/
-/* Private define ------------------------------------------------------------*/
-#define CELSIUS_ASCII_CODE 248
-
-/* Private macro -------------------------------------------------------------*/
-/* Private variables ---------------------------------------------------------*/
-/* Private function prototypes -----------------------------------------------*/
-/* Private functions ---------------------------------------------------------*/
-
-/**
- * @brief Test of STTS22H and LPS22HB temperature sensors.
- */
-void Temperature_Test(void)
-{
- char temp[64];
- float temperature;
- temperature = 0;
- BSP_LCD_Clear(0,SSD1315_COLOR_BLACK);
- BSP_LCD_Refresh(0);
- UTIL_LCD_DisplayStringAt(0, 0, (uint8_t *)"Temperature", CENTER_MODE);
- UTIL_LCD_DisplayStringAt(0, 12, (uint8_t *)"Measure", CENTER_MODE);
- UTIL_LCD_DrawRect(0, 0, 127 , 23, SSD1315_COLOR_WHITE);
- BSP_LCD_Refresh(0);
-
- (void)BSP_ENV_SENSOR_Init(ENV_SENSOR_STTS22H_0, ENV_TEMPERATURE);
- (void)BSP_ENV_SENSOR_Enable(ENV_SENSOR_STTS22H_0, ENV_TEMPERATURE);
- while (1)
- {
- (void)BSP_ENV_SENSOR_GetValue(ENV_SENSOR_STTS22H_0, ENV_TEMPERATURE, &temperature);
- sprintf(temp,"Temp=%f", temperature);
- UTIL_LCD_DisplayStringAt(0, 37, (uint8_t *)temp, CENTER_MODE);
- BSP_LCD_Refresh(0);
-
- if(CheckForUserInput() > 0)
- {
- ButtonState = 0;
- (void)BSP_ENV_SENSOR_Disable(ENV_SENSOR_STTS22H_0, ENV_TEMPERATURE);
- (void)BSP_ENV_SENSOR_DeInit(ENV_SENSOR_STTS22H_0);
- return;
- }
- }
-}
-
-/**
- * @brief Test of LSM6DSL accelerometer sensor.
- */
-void Accelero_Test(void)
-{
- char acc_x[64];
- char acc_y[64];
- char acc_z[64];
- MOTION_SENSOR_Axes_t acceleration;
-
- (void)BSP_MOTION_SENSOR_Init(MOTION_SENSOR_ISM330DHCX_0, MOTION_ACCELERO);
- (void)BSP_MOTION_SENSOR_Enable(MOTION_SENSOR_ISM330DHCX_0, MOTION_ACCELERO);
-
- while (1)
- {
- BSP_LCD_Clear(0,SSD1315_COLOR_BLACK);
- BSP_LCD_Refresh(0);
- UTIL_LCD_DisplayStringAt(0, 0, (uint8_t *)"Accelerometer", CENTER_MODE);
- UTIL_LCD_DisplayStringAt(0, 12, (uint8_t *)"Measure ", CENTER_MODE);
- UTIL_LCD_DrawRect(0, 0, 127 , 23, SSD1315_COLOR_WHITE);
- BSP_LCD_Refresh(0);
- memset(&acceleration, 0, sizeof(MOTION_SENSOR_Axes_t));
- (void)BSP_MOTION_SENSOR_GetAxes(MOTION_SENSOR_ISM330DHCX_0, MOTION_ACCELERO, &acceleration);
- sprintf(acc_x," ACC_X = %ld", acceleration.x);
- sprintf(acc_y," ACC_Y = %ld", acceleration.y);
- sprintf(acc_z," ACC_Z = %ld", acceleration.z);
- UTIL_LCD_DisplayStringAt(0, 25, (uint8_t *)acc_x, LEFT_MODE);
- UTIL_LCD_DisplayStringAt(0, 37, (uint8_t *)acc_y, LEFT_MODE);
- UTIL_LCD_DisplayStringAt(0, 49, (uint8_t *)acc_z, LEFT_MODE);
- BSP_LCD_Refresh(0);
- HAL_Delay(1000);
-
- if(CheckForUserInput() > 0)
- {
- ButtonState = 0;
- (void)BSP_MOTION_SENSOR_Disable(MOTION_SENSOR_ISM330DHCX_0, MOTION_ACCELERO);
- (void)BSP_MOTION_SENSOR_DeInit(MOTION_SENSOR_ISM330DHCX_0);
- return;
- }
- }
-}
-
-/**
- * @brief Test of ISM330DHCX gyroscope sensor.
- */
-void Gyro_Test(void)
-{
- char gyr_x[64];
- char gyr_y[64];
- char gyr_z[64];
- MOTION_SENSOR_Axes_t angular_velocity;
-
- (void)BSP_MOTION_SENSOR_Init(MOTION_SENSOR_ISM330DHCX_0, MOTION_GYRO);
- (void)BSP_MOTION_SENSOR_Enable(MOTION_SENSOR_ISM330DHCX_0, MOTION_GYRO);
-
- while (1)
- {
- BSP_LCD_Clear(0,SSD1315_COLOR_BLACK);
- BSP_LCD_Refresh(0);
- UTIL_LCD_DisplayStringAt(0, 0, (uint8_t *)"Gyroscope Measure ", CENTER_MODE);
- UTIL_LCD_DrawRect(0, 0, 127 , 11, SSD1315_COLOR_WHITE);
- BSP_LCD_Refresh(0);
- memset(&angular_velocity, 0, sizeof(MOTION_SENSOR_Axes_t));
- (void)BSP_MOTION_SENSOR_GetAxes(MOTION_SENSOR_ISM330DHCX_0, MOTION_GYRO, &angular_velocity);
- sprintf(gyr_x," GYRO_X = %ld", angular_velocity.x);
- sprintf(gyr_y," GYRO_Y = %ld", angular_velocity.y);
- sprintf(gyr_z," GYRO_Z = %ld", angular_velocity.z);
- UTIL_LCD_DisplayStringAt(0, 25, (uint8_t *)gyr_x, LEFT_MODE);
- UTIL_LCD_DisplayStringAt(0, 37, (uint8_t *)gyr_y, LEFT_MODE);
- UTIL_LCD_DisplayStringAt(0, 49, (uint8_t *)gyr_z, LEFT_MODE);
- BSP_LCD_Refresh(0);
- HAL_Delay(1000);
-
- if(CheckForUserInput() > 0)
- {
- ButtonState = 0;
- (void)BSP_MOTION_SENSOR_Disable(MOTION_SENSOR_ISM330DHCX_0, MOTION_GYRO);
- (void)BSP_MOTION_SENSOR_DeInit(MOTION_SENSOR_ISM330DHCX_0);
- return;
- }
- }
-}
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/stm32wbxx_hal_msp.c b/Projects/STM32WB5MM-DK/Examples/BSP/Src/stm32wbxx_hal_msp.c
deleted file mode 100644
index 3bf1f5745..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/stm32wbxx_hal_msp.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- ******************************************************************************
- * @file Templates/Src/stm32l4xx_hal_msp.c
- * @author MCD Application Team
- * @brief HAL MSP module.
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2017(-2021) STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32l4xx_hal.h"
-
-/** @addtogroup STM32L4xx_HAL_Driver
- * @{
- */
-
-/** @defgroup HAL_MSP
- * @brief HAL MSP module.
- * @{
- */
-
-/* Private typedef -----------------------------------------------------------*/
-/* Private define ------------------------------------------------------------*/
-/* Private macro -------------------------------------------------------------*/
-/* Private variables ---------------------------------------------------------*/
-/* Private function prototypes -----------------------------------------------*/
-/* Private functions ---------------------------------------------------------*/
-
-/** @defgroup HAL_MSP_Private_Functions
- * @{
- */
-
-/**
- * @brief Initializes the Global MSP.
- * @param None
- * @retval None
- */
-void HAL_MspInit(void)
-{
-}
-
-/**
- * @brief DeInitializes the Global MSP.
- * @param None
- * @retval None
- */
-void HAL_MspDeInit(void)
-{
-}
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/stm32wbxx_it.c b/Projects/STM32WB5MM-DK/Examples/BSP/Src/stm32wbxx_it.c
deleted file mode 100644
index 4b77a6ac2..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/stm32wbxx_it.c
+++ /dev/null
@@ -1,213 +0,0 @@
-/**
- ******************************************************************************
- * @file stm32wbxx_it.c
- * @author MCD Application Team
- * @brief Main Interrupt Service Routines.
- * This file provides template for all exceptions handler and
- * peripherals interrupt service routine.
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2017(-2021) STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Includes ------------------------------------------------------------------*/
-#include "main.h"
-#include "stm32wbxx_it.h"
-#include "stm32wb5mm_dk.h"
-
-/** @addtogroup STM32WBxx_HAL_Examples
- * @{
- */
-
-/** @addtogroup BSP
- * @{
- */
-
-/* Private typedef -----------------------------------------------------------*/
-/* Private define ------------------------------------------------------------*/
-/* Private macro -------------------------------------------------------------*/
-/* Private variables ---------------------------------------------------------*/
-/* Private function prototypes -----------------------------------------------*/
-/* Private functions ---------------------------------------------------------*/
-extern PCD_HandleTypeDef hpcd;
-extern SAI_HandleTypeDef hAudioInSai;
-
-/******************************************************************************/
-/* Cortex-M4 and Cortex-M0+ Processors Exceptions Handlers */
-/******************************************************************************/
-
-/**
- * @brief This function handles NMI exception.
- * @param None
- * @retval None
- */
-void NMI_Handler(void)
-{
-}
-
-/**
- * @brief This function handles Hard Fault exception.
- * @param None
- * @retval None
- */
-void HardFault_Handler(void)
-{
- /* Go to infinite loop when Hard Fault exception occurs */
- while (1)
- {
- }
-}
-
-/**
- * @brief This function handles SysTick Handler.
- * @param None
- * @retval None
- */
-void SysTick_Handler(void)
-{
- HAL_IncTick();
-}
-
-/**
- * @brief This function handles SVCall exception.
- * @param None
- * @retval None
- */
-void SVC_Handler(void)
-{
-}
-
-/**
- * @brief This function handles PendSVC exception.
- * @param None
- * @retval None
- */
-void PendSV_Handler(void)
-{
-}
-
-/******************************************************************************/
-/* Cortex-M4 Processor Exceptions Handlers */
-/******************************************************************************/
-
-/**
- * @brief This function handles Memory Manage exception.
- * @param None
- * @retval None
- */
-void MemManage_Handler(void)
-{
- /* Go to infinite loop when Memory Manage exception occurs */
- while (1)
- {
- }
-}
-
-/**
- * @brief This function handles Bus Fault exception.
- * @param None
- * @retval None
- */
-void BusFault_Handler(void)
-{
- /* Go to infinite loop when Bus Fault exception occurs */
- while (1)
- {
- }
-}
-
-/**
- * @brief This function handles Usage Fault exception.
- * @param None
- * @retval None
- */
-void UsageFault_Handler(void)
-{
- /* Go to infinite loop when Usage Fault exception occurs */
- while (1)
- {
- }
-}
-
-/**
- * @brief This function handles Debug Monitor exception.
- * @param None
- * @retval None
- */
-void DebugMon_Handler(void)
-{
-}
-
-
-/******************************************************************************/
-/* STM32WBxx Peripherals Interrupt Handlers */
-/* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */
-/* available peripheral interrupt handler's name please refer to the startup */
-/* file (startup_stm32wbxxxx.s). */
-/******************************************************************************/
-
-/**
- * @brief This function handles EXTI0_IRQ Handler.
- * @param None
- * @retval None
- */
-void EXTI0_IRQHandler(void)
-{
- HAL_EXTI_IRQHandler(&hpb_exti[BUTTON_USER1]);
-}
-
-/**
- * @brief This function handles EXTI13_IRQ Handler.
- * @param None
- * @retval None
- */
-void EXTI15_10_IRQHandler(void)
-{
- BSP_PB_IRQHandler(BUTTON_USER1);
-}
-
-/**
- * @brief This function handles TIM17 IRQ Handler.
- * @param None
- * @retval None
- */
-void TIM1_TRG_COM_TIM17_IRQHandler(void)
-{
- BSP_PWM_LED_IRQHandler();
-}
-
-/**
- * @brief This function handles DMA Stream interrupt request.
- * @param None
- * @retval None
- */
-void DMA1_Channel1_IRQHandler(void)
-{
- HAL_DMA_IRQHandler(hAudioInSai.hdmarx);
-}
-
-/**
- * @brief This function handles USB Handler.
- * @param None
- * @retval None
- */
-void USB_LP_IRQHandler(void)
-{
- HAL_PCD_IRQHandler(&hpcd);
-}
-
-/**
- * @}
- */
-
-/**
- * @}
- */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/system_stm32wbxx.c b/Projects/STM32WB5MM-DK/Examples/BSP/Src/system_stm32wbxx.c
deleted file mode 100644
index acc42ab48..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/system_stm32wbxx.c
+++ /dev/null
@@ -1,360 +0,0 @@
-/**
- ******************************************************************************
- * @file system_stm32wbxx.c
- * @author MCD Application Team
- * @brief CMSIS Cortex Device Peripheral Access Layer System Source File
- *
- * This file provides two functions and one global variable to be called from
- * user application:
- * - SystemInit(): This function is called at startup just after reset and
- * before branch to main program. This call is made inside
- * the "startup_stm32wbxx.s" file.
- *
- * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used
- * by the user application to setup the SysTick
- * timer or configure other parameters.
- *
- * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must
- * be called whenever the core clock is changed
- * during program execution.
- *
- * After each device reset the MSI (4 MHz) is used as system clock source.
- * Then SystemInit() function is called, in "startup_stm32wbxx.s" file, to
- * configure the system clock before to branch to main program.
- *
- * This file configures the system clock as follows:
- *=============================================================================
- *-----------------------------------------------------------------------------
- * System Clock source | MSI
- *-----------------------------------------------------------------------------
- * SYSCLK(Hz) | 4000000
- *-----------------------------------------------------------------------------
- * HCLK(Hz) | 4000000
- *-----------------------------------------------------------------------------
- * AHB Prescaler | 1
- *-----------------------------------------------------------------------------
- * APB1 Prescaler | 1
- *-----------------------------------------------------------------------------
- * APB2 Prescaler | 1
- *-----------------------------------------------------------------------------
- * PLL_M | 1
- *-----------------------------------------------------------------------------
- * PLL_N | 8
- *-----------------------------------------------------------------------------
- * PLL_P | 7
- *-----------------------------------------------------------------------------
- * PLL_Q | 2
- *-----------------------------------------------------------------------------
- * PLL_R | 2
- *-----------------------------------------------------------------------------
- * PLLSAI1_P | NA
- *-----------------------------------------------------------------------------
- * PLLSAI1_Q | NA
- *-----------------------------------------------------------------------------
- * PLLSAI1_R | NA
- *-----------------------------------------------------------------------------
- * Require 48MHz for USB OTG FS, | Disabled
- * SDIO and RNG clock |
- *-----------------------------------------------------------------------------
- *=============================================================================
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2019-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/** @addtogroup CMSIS
- * @{
- */
-
-/** @addtogroup stm32WBxx_system
- * @{
- */
-
-/** @addtogroup stm32WBxx_System_Private_Includes
- * @{
- */
-
-#include "stm32wbxx.h"
-
-#if !defined (HSE_VALUE)
- #define HSE_VALUE (32000000UL) /*!< Value of the External oscillator in Hz */
-#endif /* HSE_VALUE */
-
-#if !defined (MSI_VALUE)
- #define MSI_VALUE (4000000UL) /*!< Value of the Internal oscillator in Hz*/
-#endif /* MSI_VALUE */
-
-#if !defined (HSI_VALUE)
- #define HSI_VALUE (16000000UL) /*!< Value of the Internal oscillator in Hz*/
-#endif /* HSI_VALUE */
-
-#if !defined (LSI_VALUE)
- #define LSI_VALUE (32000UL) /*!< Value of LSI in Hz*/
-#endif /* LSI_VALUE */
-
-#if !defined (LSE_VALUE)
-#if defined(STM32WB5Mxx)
- #define LSE_VALUE 32774U /*!< Value of the LSE oscillator in Hz */
-#else
- #define LSE_VALUE 32768U /*!< Value of the LSE oscillator in Hz */
-#endif /* STM32WB5Mxx */
-#endif /* LSE_VALUE */
-
-/**
- * @}
- */
-
-/** @addtogroup STM32WBxx_System_Private_TypesDefinitions
- * @{
- */
-
-/**
- * @}
- */
-
-/** @addtogroup STM32WBxx_System_Private_Defines
- * @{
- */
-
-/*!< Uncomment the following line if you need to relocate your vector Table in
- Internal SRAM. */
-/* #define VECT_TAB_SRAM */
-#define VECT_TAB_OFFSET 0x0U /*!< Vector Table base offset field.
- This value must be a multiple of 0x200. */
-
-#define VECT_TAB_BASE_ADDRESS SRAM1_BASE /*!< Vector Table base offset field.
- This value must be a multiple of 0x200. */
-/**
- * @}
- */
-
-/** @addtogroup STM32WBxx_System_Private_Macros
- * @{
- */
-
-/**
- * @}
- */
-
-/** @addtogroup STM32WBxx_System_Private_Variables
- * @{
- */
- /* The SystemCoreClock variable is updated in three ways:
- 1) by calling CMSIS function SystemCoreClockUpdate()
- 2) by calling HAL API function HAL_RCC_GetHCLKFreq()
- 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
- Note: If you use this function to configure the system clock; then there
- is no need to call the 2 first functions listed above, since SystemCoreClock
- variable is updated automatically.
- */
- uint32_t SystemCoreClock = 4000000UL ; /*CPU1: M4 on MSI clock after startup (4MHz)*/
-
- const uint32_t AHBPrescTable[16UL] = {1UL, 3UL, 5UL, 1UL, 1UL, 6UL, 10UL, 32UL, 2UL, 4UL, 8UL, 16UL, 64UL, 128UL, 256UL, 512UL};
-
- const uint32_t APBPrescTable[8UL] = {0UL, 0UL, 0UL, 0UL, 1UL, 2UL, 3UL, 4UL};
-
- const uint32_t MSIRangeTable[16UL] = {100000UL, 200000UL, 400000UL, 800000UL, 1000000UL, 2000000UL, \
- 4000000UL, 8000000UL, 16000000UL, 24000000UL, 32000000UL, 48000000UL, 0UL, 0UL, 0UL, 0UL}; /* 0UL values are incorrect cases */
-
-#if defined(STM32WB55xx) || defined(STM32WB5Mxx) || defined(STM32WB35xx) || defined (STM32WB15xx)
- const uint32_t SmpsPrescalerTable[4UL][6UL]={{1UL,3UL,2UL,2UL,1UL,2UL}, \
- {2UL,6UL,4UL,3UL,2UL,4UL}, \
- {4UL,12UL,8UL,6UL,4UL,8UL}, \
- {4UL,12UL,8UL,6UL,4UL,8UL}};
-#endif
-
-/**
- * @}
- */
-
-/** @addtogroup STM32WBxx_System_Private_FunctionPrototypes
- * @{
- */
-
-/**
- * @}
- */
-
-/** @addtogroup STM32WBxx_System_Private_Functions
- * @{
- */
-
-/**
- * @brief Setup the microcontroller system.
- * @param None
- * @retval None
- */
-void SystemInit(void)
-{
- /* Configure the Vector Table location add offset address ------------------*/
-#if defined(VECT_TAB_SRAM) && defined(VECT_TAB_BASE_ADDRESS)
- /* program in SRAMx */
- SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAMx for CPU1 */
-#else /* program in FLASH */
- SCB->VTOR = VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
-#endif
-
- /* FPU settings ------------------------------------------------------------*/
- #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
- SCB->CPACR |= ((3UL << (10UL*2UL))|(3UL << (11UL*2UL))); /* set CP10 and CP11 Full Access */
- #endif
-
-#if defined(CORE_CM4)
- /* Reset the RCC clock configuration to the default reset state ------------*/
- /* Set MSION bit */
- RCC->CR |= RCC_CR_MSION;
-
- /* Reset CFGR register */
- RCC->CFGR = 0x00070000U;
-
- /* Reset PLLSAI1ON, PLLON, HSECSSON, HSEON, HSION, and MSIPLLON bits */
- RCC->CR &= (uint32_t)0xFAF6FEFBU;
-
- /*!< Reset LSI1 and LSI2 bits */
- RCC->CSR &= (uint32_t)0xFFFFFFFAU;
-
- /*!< Reset HSI48ON bit */
- RCC->CRRCR &= (uint32_t)0xFFFFFFFEU;
-
- /* Reset PLLCFGR register */
- RCC->PLLCFGR = 0x22041000U;
-
-#if defined(STM32WB55xx) || defined(STM32WB5Mxx)
- /* Reset PLLSAI1CFGR register */
- RCC->PLLSAI1CFGR = 0x22041000U;
-#endif
-
- /* Reset HSEBYP bit */
- RCC->CR &= 0xFFFBFFFFU;
-
- /* Disable all interrupts */
- RCC->CIER = 0x00000000;
-#endif
-}
-
-/**
- * @brief Update SystemCoreClock variable according to Clock Register Values.
- * The SystemCoreClock variable contains the core clock (HCLK), it can
- * be used by the user application to setup the SysTick timer or configure
- * other parameters.
- *
- * @note Each time the core clock (HCLK) changes, this function must be called
- * to update SystemCoreClock variable value. Otherwise, any configuration
- * based on this variable will be incorrect.
- *
- * @note - The system frequency computed by this function is not the real
- * frequency in the chip. It is calculated based on the predefined
- * constant and the selected clock source:
- *
- * - If SYSCLK source is MSI, SystemCoreClock will contain the MSI_VALUE(*)
- *
- * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(**)
- *
- * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(***)
- *
- * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(***)
- * or HSI_VALUE(*) or MSI_VALUE(*) multiplied/divided by the PLL factors.
- *
- * (*) MSI_VALUE is a constant defined in stm32wbxx_hal.h file (default value
- * 4 MHz) but the real value may vary depending on the variations
- * in voltage and temperature.
- *
- * (**) HSI_VALUE is a constant defined in stm32wbxx_hal_conf.h file (default value
- * 16 MHz) but the real value may vary depending on the variations
- * in voltage and temperature.
- *
- * (***) HSE_VALUE is a constant defined in stm32wbxx_hal_conf.h file (default value
- * 32 MHz), user has to ensure that HSE_VALUE is same as the real
- * frequency of the crystal used. Otherwise, this function may
- * have wrong result.
- *
- * - The result of this function could be not correct when using fractional
- * value for HSE crystal.
- *
- * @param None
- * @retval None
- */
-void SystemCoreClockUpdate(void)
-{
- uint32_t tmp, msirange, pllvco, pllr, pllsource , pllm;
-
- /* Get MSI Range frequency--------------------------------------------------*/
-
- /*MSI frequency range in Hz*/
- msirange = MSIRangeTable[(RCC->CR & RCC_CR_MSIRANGE) >> RCC_CR_MSIRANGE_Pos];
-
- /* Get SYSCLK source -------------------------------------------------------*/
- switch (RCC->CFGR & RCC_CFGR_SWS)
- {
- case 0x00: /* MSI used as system clock source */
- SystemCoreClock = msirange;
- break;
-
- case 0x04: /* HSI used as system clock source */
- /* HSI used as system clock source */
- SystemCoreClock = HSI_VALUE;
- break;
-
- case 0x08: /* HSE used as system clock source */
- SystemCoreClock = HSE_VALUE;
- break;
-
- case 0x0C: /* PLL used as system clock source */
- /* PLL_VCO = (HSE_VALUE or HSI_VALUE or MSI_VALUE/ PLLM) * PLLN
- SYSCLK = PLL_VCO / PLLR
- */
- pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC);
- pllm = ((RCC->PLLCFGR & RCC_PLLCFGR_PLLM) >> RCC_PLLCFGR_PLLM_Pos) + 1UL ;
-
- if(pllsource == 0x02UL) /* HSI used as PLL clock source */
- {
- pllvco = (HSI_VALUE / pllm);
- }
- else if(pllsource == 0x03UL) /* HSE used as PLL clock source */
- {
- pllvco = (HSE_VALUE / pllm);
- }
- else /* MSI used as PLL clock source */
- {
- pllvco = (msirange / pllm);
- }
-
- pllvco = pllvco * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> RCC_PLLCFGR_PLLN_Pos);
- pllr = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLR) >> RCC_PLLCFGR_PLLR_Pos) + 1UL);
-
- SystemCoreClock = pllvco/pllr;
- break;
-
- default:
- SystemCoreClock = msirange;
- break;
- }
-
- /* Compute HCLK clock frequency --------------------------------------------*/
- /* Get HCLK1 prescaler */
- tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos)];
- /* HCLK clock frequency */
- SystemCoreClock = SystemCoreClock / tmp;
-
-}
-
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/usb/usbd_audio_if.c b/Projects/STM32WB5MM-DK/Examples/BSP/Src/usb/usbd_audio_if.c
deleted file mode 100644
index 417ff8f9f..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/usb/usbd_audio_if.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/**
- ******************************************************************************
- * @file usbd_audio_if.c
- * @author MCD Application Team
- * @brief USB Device Audio interface file.
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2020-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Includes ------------------------------------------------------------------*/
-#include "usbd_audio_if.h"
-#include "stm32wb5mm_dk_errno.h"
-
-extern uint16_t PDM_Buffer[];
-extern BSP_AUDIO_Init_t MicParams;
-
-/* Private typedef -----------------------------------------------------------*/
-/* Private define ------------------------------------------------------------*/
-/* Private macro -------------------------------------------------------------*/
-/* Private function prototypes -----------------------------------------------*/
-static int8_t Audio_Init(uint32_t AudioFreq, uint32_t BitRes, uint32_t ChnlNbr);
-static int8_t Audio_DeInit(uint32_t options);
-static int8_t Audio_Record(void);
-static int8_t Audio_VolumeCtl(int16_t Volume);
-static int8_t Audio_MuteCtl(uint8_t cmd);
-static int8_t Audio_Stop(void);
-static int8_t Audio_Pause(void);
-static int8_t Audio_Resume(void);
-static int8_t Audio_CommandMgr(uint8_t cmd);
-
-/* Private variables ---------------------------------------------------------*/
-extern USBD_HandleTypeDef hUSBDDevice;
-USBD_AUDIO_ItfTypeDef USBD_AUDIO_fops = {
- Audio_Init,
- Audio_DeInit,
- Audio_Record,
- Audio_VolumeCtl,
- Audio_MuteCtl,
- Audio_Stop,
- Audio_Pause,
- Audio_Resume,
- Audio_CommandMgr,
-};
-
-
-/* Private functions ---------------------------------------------------------*/
-/* This table maps the audio device class setting in 1/256 dB to a
-* linear 0-64 scaling used in pdm_filter.c. It is computed as
-* 256*20*log10(index/64). */
-const int16_t vol_table[65] =
-{ 0x8000, 0xDBE0, 0xE1E6, 0xE56B, 0xE7EB, 0xE9DB, 0xEB70, 0xECC7,
-0xEDF0, 0xEEF6, 0xEFE0, 0xF0B4, 0xF176, 0xF228, 0xF2CD, 0xF366,
-0xF3F5, 0xF47C, 0xF4FB, 0xF574, 0xF5E6, 0xF652, 0xF6BA, 0xF71C,
-0xF778, 0xF7D6, 0xF82D, 0xF881, 0xF8D2, 0xF920, 0xF96B, 0xF9B4,
-0xF9FB, 0xFA3F, 0xFA82, 0xFAC2, 0xFB01, 0xFB3E, 0xFB79, 0xFBB3,
-0xFBEB, 0xFC22, 0xFC57, 0xFC8C, 0xFCBF, 0xFCF1, 0xFD22, 0xFD51,
-0xFD80, 0xFDAE, 0xFDDB, 0xFE07, 0xFE32, 0xFE5D, 0xFE86, 0xFEAF,
-0xFED7, 0xFF00, 0xFF25, 0xFF4B, 0xFF70, 0xFF95, 0xFFB9, 0xFFD0,
-0x0000 };
-
-
-/* Private functions ---------------------------------------------------------*/
-/**
- * @brief Initializes the AUDIO media low layer.
- * @param AudioFreq: Audio frequency used to play the audio stream.
- * @param BitRes: desired bit resolution
- * @param ChnlNbr: number of channel to be configured
- * @retval BSP_ERROR_NONE in case of success, AUDIO_ERROR otherwise
- */
-static int8_t Audio_Init(uint32_t AudioFreq, uint32_t BitRes, uint32_t ChnlNbr)
-{
-#ifndef DISABLE_USB_DRIVEN_ACQUISITION
- return BSP_AUDIO_IN_Init(BSP_AUDIO_INSTANCE, &MicParams);
-#else
- return BSP_ERROR_NONE;
-#endif
-}
-
-/**
- * @brief De-Initializes the AUDIO media low layer.
- * @param options: Reserved for future use
- * @retval BSP_ERROR_NONE in case of success, AUDIO_ERROR otherwise
- */
-static int8_t Audio_DeInit(uint32_t options)
-{
- return BSP_ERROR_NONE;
-}
-
-/**
- * @brief Start audio recording engine
- * @retval BSP_ERROR_NONE in case of success, AUDIO_ERROR otherwise
- */
-static int8_t Audio_Record(void)
-{
-#ifndef DISABLE_USB_DRIVEN_ACQUISITION
- return BSP_AUDIO_IN_Record(BSP_AUDIO_INSTANCE, (uint8_t *) PDM_Buffer, 0);
-#else
- return BSP_ERROR_NONE;
-#endif
-}
-
-/**
- * @brief Controls AUDIO Volume.
- * @param vol: Volume level
- * @retval BSP_ERROR_NONE in case of success, AUDIO_ERROR otherwise
- */
-static int8_t Audio_VolumeCtl(int16_t Volume)
-{
- /* Call low layer volume setting function */
- uint32_t j, mic_instance;
-
- j = 0;
- /* Find the setting nearest to the desired setting */
- while(j<64 &&
- abs(Volume-vol_table[j]) > abs(Volume-vol_table[j+1])) {
- j++;
- }
- mic_instance = 0;
- /* Now do the volume adjustment */
- return BSP_AUDIO_IN_SetVolume(mic_instance, j);
-}
-
-/**
- * @brief Controls AUDIO Mute.
- * @param cmd: Command opcode
- * @retval BSP_ERROR_NONE in case of success, AUDIO_ERROR otherwise
- */
-static int8_t Audio_MuteCtl(uint8_t cmd)
-{
- return BSP_ERROR_NONE;
-}
-
-/**
- * @brief Stops audio acquisition
- * @param none
- * @retval BSP_ERROR_NONE in case of success, AUDIO_ERROR otherwise
- */
-static int8_t Audio_Stop(void)
-{
-#ifndef DISABLE_USB_DRIVEN_ACQUISITION
- return BSP_AUDIO_IN_Stop(BSP_AUDIO_INSTANCE);
-#else
- return BSP_ERROR_NONE;
-#endif
-}
-
-/**
- * @brief Pauses audio acquisition
- * @param none
- * @retval BSP_ERROR_NONE in case of success, AUDIO_ERROR otherwise
- */
-static int8_t Audio_Pause(void)
-{
- return 0;
-}
-
-/**
- * @brief Resumes audio acquisition
- * @param none
- * @retval BSP_ERROR_NONE in case of success, AUDIO_ERROR otherwise
- */
-static int8_t Audio_Resume(void)
-{
- return BSP_ERROR_NONE;
-}
-
-/**
- * @brief Manages command from usb
- * @param None
- * @retval BSP_ERROR_NONE in case of success, AUDIO_ERROR otherwise
- */
-static int8_t Audio_CommandMgr(uint8_t cmd)
-{
- return BSP_ERROR_NONE;
-}
-
-/**
- * @brief Fills USB audio buffer with the right amount of data, depending on the
- * channel/frequency configuration
- * @param audioData: pointer to the PCM audio data
- * @param PCMSamples: number of PCM samples to be passed to USB engine
- * @note Depending on the calling frequency, a coherent amount of samples must be passed to
- * the function. E.g.: assuming a Sampling frequency of 16 KHz and 1 channel,
- * you can pass 16 PCM samples if the function is called each millisecond,
- * 32 samples if called every 2 milliseconds and so on.
- */
-void Send_Audio_to_USB(int16_t * audioData, uint16_t PCMSamples)
-{
- USBD_AUDIO_Data_Transfer(&hUSBDDevice, (int16_t *)audioData, PCMSamples);
-}
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/usb/usbd_audio_in.c b/Projects/STM32WB5MM-DK/Examples/BSP/Src/usb/usbd_audio_in.c
deleted file mode 100644
index 62d6c914b..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/usb/usbd_audio_in.c
+++ /dev/null
@@ -1,989 +0,0 @@
-/**
- ******************************************************************************
- * @file usbd_audio_in.c
- * @author MCD Application Team
- * @brief This file provides the Audio Input core functions.
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2020-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- @verbatim
- ==============================================================================
- ##### Audio Input core features #####
- ==============================================================================
- [..]
-
- (#) This file provides the Audio Input core functions.
-
- (++) This driver implements the following aspects:
- (+++) Device descriptor management
- (+++) Configuration descriptor management
- (+++) Standard AC Interface Descriptor management
- (+++) 1 Audio Streaming Interface
- (+++) 1 Audio Streaming Endpoint
- (+++) 1 Audio Terminal Input
- (+++) Audio Class-Specific AC Interfaces
- (+++) Audio Class-Specific AS Interfaces
- (+++) AudioControl Requests: mute and volume control
- (+++) Audio Synchronization type: Asynchronous
- (+++) Multiple frequencies and channel number configurable using ad hoc
- init function
-
- (++) The current audio class version supports the following audio features:
- (+++) Pulse Coded Modulation (PCM) format
- (+++) Configurable sampling rate
- (+++) Bit resolution: 16
- (+++) Configurable Number of channels
- (+++) Volume control
- (+++) Mute/Unmute capability
- (+++) Asynchronous Endpoints
-
- @endverbatim
- ******************************************************************************
- */
-
-/* Includes ------------------------------------------------------------------*/
-
-#include "usbd_audio_in.h"
-#include "usbd_desc.h"
-#include "usbd_ctlreq.h"
-
-/** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
- * @{
- */
-
-/** @defgroup USBD_AUDIO_IN_Private_TypesDefinitions
- * @{
- */
-/**
- * @}
- */
-
-/** @defgroup USBD_AUDIO_IN_Private_Defines
- * @{
- */
-
-/**
- * @}
- */
-
-/** @defgroup USBD_AUDIO_IN_Private_Macros
- * @{
- */
-/**
- * @}
- */
-
-/** @defgroup USBD_AUDIO_IN_Private_FunctionPrototypes
- * @{
- */
-static uint8_t USBD_AUDIO_Init (USBD_HandleTypeDef *pdev, uint8_t cfgidx);
-static uint8_t USBD_AUDIO_DeInit (USBD_HandleTypeDef *pdev, uint8_t cfgidx);
-static uint8_t USBD_AUDIO_Setup (USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
-static uint8_t *USBD_AUDIO_GetCfgDesc (uint16_t *length);
-static uint8_t *USBD_AUDIO_GetDeviceQualifierDesc (uint16_t *length);
-static uint8_t USBD_AUDIO_DataIn (USBD_HandleTypeDef *pdev, uint8_t epnum);
-static uint8_t USBD_AUDIO_DataOut (USBD_HandleTypeDef *pdev, uint8_t epnum);
-static uint8_t USBD_AUDIO_EP0_RxReady (USBD_HandleTypeDef *pdev);
-static uint8_t USBD_AUDIO_EP0_TxReady (USBD_HandleTypeDef *pdev);
-static uint8_t USBD_AUDIO_SOF (USBD_HandleTypeDef *pdev);
-static uint8_t USBD_AUDIO_IsoINIncomplete (USBD_HandleTypeDef *pdev, uint8_t epnum);
-static uint8_t USBD_AUDIO_IsoOutIncomplete (USBD_HandleTypeDef *pdev, uint8_t epnum);
-static void AUDIO_REQ_GetCurrent(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
-static void AUDIO_REQ_SetCurrent(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
-static void AUDIO_REQ_GetMaximum(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
-static void AUDIO_REQ_GetMinimum(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
-static void AUDIO_REQ_GetResolution(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
-
-/**
- * @}
- */
-
-/** @defgroup USBD_AUDIO_Private_Variables
- * @{
- */
-/* This dummy buffer with 0 values will be sent when there is no available data */
-static uint8_t IsocInBuffDummy[48*4*2];
-static int16_t VOL_CUR;
-static USBD_AUDIO_HandleTypeDef haudioInstance;
-
-USBD_ClassTypeDef USBD_AUDIO =
-{
- USBD_AUDIO_Init,
- USBD_AUDIO_DeInit,
- USBD_AUDIO_Setup,
- USBD_AUDIO_EP0_TxReady,
- USBD_AUDIO_EP0_RxReady,
- USBD_AUDIO_DataIn,
- USBD_AUDIO_DataOut,
- USBD_AUDIO_SOF,
- USBD_AUDIO_IsoINIncomplete,
- USBD_AUDIO_IsoOutIncomplete,
- USBD_AUDIO_GetCfgDesc,
- USBD_AUDIO_GetCfgDesc,
- USBD_AUDIO_GetCfgDesc,
- USBD_AUDIO_GetDeviceQualifierDesc,
-};
-
-/* USB AUDIO device Configuration Descriptor */
-/* NOTE: This descriptor has to be filled using the Descriptor Initialization function */
-__ALIGN_BEGIN static uint8_t USBD_AUDIO_CfgDesc[USB_AUDIO_CONFIG_DESC_SIZ + 9] __ALIGN_END;
-
-/* USB Standard Device Descriptor */
-__ALIGN_BEGIN static uint8_t USBD_AUDIO_DeviceQualifierDesc[USB_LEN_DEV_QUALIFIER_DESC] __ALIGN_END=
-{
- USB_LEN_DEV_QUALIFIER_DESC,
- USB_DESC_TYPE_DEVICE_QUALIFIER,
- 0x00,
- 0x02,
- 0x00,
- 0x00,
- 0x00,
- 0x40,
- 0x01,
- 0x00,
-};
-/**
- * @}
- */
-
-/** @defgroup USBD_AUDIO_IN_Private_Functions
- * @{
- */
-/**
- * @brief USBD_AUDIO_Init
- * Initialize the AUDIO interface
- * @param pdev: device instance
- * @param cfgidx: Configuration index
- * @retval status
- */
-static uint8_t USBD_AUDIO_Init(USBD_HandleTypeDef *pdev, uint8_t cfgidx)
-{
- if(haudioInstance.state!=STATE_USB_WAITING_FOR_INIT)
- {
- return USBD_FAIL;
- }
-
- USBD_AUDIO_HandleTypeDef *haudio;
- pdev->pClassDataCmsit[pdev->classId] = &haudioInstance;
- haudio = pdev->pClassDataCmsit[pdev->classId];
- uint16_t packet_dim = haudio->paketDimension;
- uint16_t wr_rd_offset = (AUDIO_IN_PACKET_NUM/2) * haudio->dataAmount / haudio->paketDimension;
- haudio->wr_ptr=wr_rd_offset * packet_dim;
- haudio->rd_ptr = 0U;
- haudio->timeout = 0U;
-
- /* Initialize the Audio output Hardware layer */
- if (((USBD_AUDIO_ItfTypeDef *)pdev->pUserData[pdev->classId])->Init(haudio->frequency,
- 0U,
- haudio->channels) != 0U)
- {
- return (uint8_t)USBD_FAIL;
- }
-
- USBD_LL_OpenEP(pdev,
- AUDIO_IN_EP,
- USBD_EP_TYPE_ISOC,
- AUDIO_IN_PACKET);
-
- USBD_LL_FlushEP(pdev, AUDIO_IN_EP);
-
- USBD_LL_Transmit(pdev, AUDIO_IN_EP,
- IsocInBuffDummy,
- packet_dim);
-
- haudio->state=STATE_USB_IDLE;
- return USBD_OK;
-}
-
-/**
- * @brief USBD_AUDIO_Init
- * DeInitialize the AUDIO layer
- * @param pdev: device instance
- * @param cfgidx: Configuration index
- * @retval status
- */
-static uint8_t USBD_AUDIO_DeInit(USBD_HandleTypeDef *pdev, uint8_t cfgidx)
-{
- USBD_AUDIO_HandleTypeDef *haudio;
-
- haudio = (USBD_AUDIO_HandleTypeDef *)(pdev->pClassDataCmsit[pdev->classId]);
-
- /* Close EP IN */
- USBD_LL_CloseEP(pdev,AUDIO_IN_EP);
-
- /* DeInit physical Interface components */
- if (haudio != NULL)
- {
- ((USBD_AUDIO_ItfTypeDef *)pdev->pUserData[pdev->classId])->DeInit(0U);
- (void)USBD_free(haudio->buffer);
- pdev->pClassDataCmsit[pdev->classId] = NULL;
- pdev->pClassData = NULL;
- }
-
- return USBD_OK;
-}
-
-/**
- * @brief USBD_AUDIO_Setup
- * Handle the AUDIO specific requests
- * @param pdev: instance
- * @param req: usb requests
- * @retval status
- */
-static uint8_t USBD_AUDIO_Setup(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
-{
- USBD_AUDIO_HandleTypeDef *haudio;
- uint16_t len;
- uint8_t *pbuf;
- uint8_t ret = USBD_OK;
- haudio = (USBD_AUDIO_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId];
-
- if (haudio == NULL)
- {
- return (uint8_t)USBD_FAIL;
- }
-
- switch (req->bmRequest & USB_REQ_TYPE_MASK)
- {
- /* AUDIO Class Requests -------------------------------*/
- case USB_REQ_TYPE_CLASS :
- switch (req->bRequest)
- {
- case AUDIO_REQ_GET_CUR:
- AUDIO_REQ_GetCurrent(pdev, req);
- break;
-
- case AUDIO_REQ_SET_CUR:
- AUDIO_REQ_SetCurrent(pdev, req);
- break;
-
- case AUDIO_REQ_GET_MIN:
- AUDIO_REQ_GetMinimum(pdev, req);
- break;
-
- case AUDIO_REQ_GET_MAX:
- AUDIO_REQ_GetMaximum(pdev, req);
- break;
-
- case AUDIO_REQ_GET_RES:
- AUDIO_REQ_GetResolution(pdev, req);
- break;
-
- default:
- USBD_CtlError (pdev, req);
- return USBD_FAIL;
- }
- break;
-
- /* Standard Requests -------------------------------*/
- case USB_REQ_TYPE_STANDARD:
- switch (req->bRequest)
- {
- case USB_REQ_GET_DESCRIPTOR:
- if( (req->wValue >> 8) == AUDIO_DESCRIPTOR_TYPE)
- {
- pbuf = USBD_AUDIO_CfgDesc + 18;
- if (pbuf != NULL)
- {
- len = MIN(USB_AUDIO_DESC_SIZ , req->wLength);
- USBD_CtlSendData (pdev, pbuf, len);
- }
- }
- break;
-
- case USB_REQ_GET_INTERFACE:
- if (pdev->dev_state == USBD_STATE_CONFIGURED)
- {
- (void)USBD_CtlSendData(pdev, (uint8_t *)&haudio->alt_setting, 1U);
- }
- else
- {
- USBD_CtlError(pdev, req);
- ret = USBD_FAIL;
- }
- break;
-
- case USB_REQ_SET_INTERFACE:
- if (pdev->dev_state == USBD_STATE_CONFIGURED)
- {
- if ((uint8_t)(req->wValue) < USBD_MAX_NUM_INTERFACES)
- {
- haudio->alt_setting = (uint8_t)(req->wValue);
- }
- else
- {
- /* Call the error management function (command will be nacked */
- USBD_CtlError (pdev, req);
- ret = USBD_FAIL;
- }
- }
- else
- {
- USBD_CtlError(pdev, req);
- ret = USBD_FAIL;
- }
- break;
-
- case USB_REQ_CLEAR_FEATURE:
- break;
-
- default:
- USBD_CtlError(pdev, req);
- ret = USBD_FAIL;
- break;
- }
- break;
-
- default:
- USBD_CtlError(pdev, req);
- ret = USBD_FAIL;
- break;
- }
-
- return ret;
-}
-
-/**
- * @brief USBD_AUDIO_GetCfgDesc
- * return configuration descriptor
- * @param length : pointer data length
- * @retval pointer to descriptor buffer
- */
-static uint8_t *USBD_AUDIO_GetCfgDesc (uint16_t *length)
-{
- *length = sizeof (USBD_AUDIO_CfgDesc);
- return USBD_AUDIO_CfgDesc;
-}
-
-/**
- * @brief USBD_AUDIO_DataIn
- * handle data IN Stage
- * @param pdev: device instance
- * @param epnum: endpoint index
- * @retval status
- */
-static uint8_t USBD_AUDIO_DataIn(USBD_HandleTypeDef *pdev, uint8_t epnum)
-{
- USBD_AUDIO_HandleTypeDef *haudio;
- haudio = (USBD_AUDIO_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId];
-
- if (haudio == NULL)
- {
- return (uint8_t)USBD_FAIL;
- }
-
- uint32_t length_usb_pck;
- uint16_t app;
- uint16_t IsocInWr_app = haudio->wr_ptr;
- uint16_t true_dim = haudio->buffer_length;
- uint16_t packet_dim = haudio->paketDimension;
- uint16_t channels = haudio->channels;
- length_usb_pck = packet_dim;
- haudio->timeout=0;
- if (epnum == (AUDIO_IN_EP & 0x7F))
- {
- if (haudio->state == STATE_USB_IDLE)
- {
- haudio->state=STATE_USB_REQUESTS_STARTED;
- ((USBD_AUDIO_ItfTypeDef *)pdev->pUserData[pdev->classId])->Record();
- }
- if (haudio->state == STATE_USB_BUFFER_WRITE_STARTED)
- {
- haudio->rd_ptr = haudio->rd_ptr % (true_dim);
- if(IsocInWr_app<haudio->rd_ptr){
- app = ((true_dim) - haudio->rd_ptr) + IsocInWr_app;
- }else{
- app = IsocInWr_app - haudio->rd_ptr;
- }
- if(app >= (packet_dim*haudio->upper_treshold)){
- length_usb_pck += channels*2;
- }else if(app <= (packet_dim*haudio->lower_treshold)){
- length_usb_pck -= channels*2;
- }
- USBD_LL_Transmit (pdev,AUDIO_IN_EP,
- (uint8_t*)(&haudio->buffer[haudio->rd_ptr]),
- length_usb_pck);
- haudio->rd_ptr += length_usb_pck;
-
- if(app < haudio->buffer_length/10)
- {
- ((USBD_AUDIO_ItfTypeDef *)pdev->pUserData[pdev->classId])->Stop();
- haudio->state = STATE_USB_IDLE;
- haudio->timeout=0;
- memset(haudio->buffer,0,(haudio->buffer_length + haudio->dataAmount));
- }
- }
- else
- {
- USBD_LL_Transmit (pdev,AUDIO_IN_EP,
- IsocInBuffDummy,
- length_usb_pck);
- }
- }
-
- return USBD_OK;
-}
-
-/**
- * @brief USBD_AUDIO_EP0_RxReady
- * handle EP0 Rx Ready event
- * @param pdev: device instance
- * @retval status
- */
-static uint8_t USBD_AUDIO_EP0_RxReady(USBD_HandleTypeDef *pdev)
-{
- USBD_AUDIO_HandleTypeDef *haudio;
- haudio = (USBD_AUDIO_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId];
-
- if (haudio == NULL)
- {
- return (uint8_t)USBD_FAIL;
- }
-
- if (haudio->control.cmd == AUDIO_REQ_SET_CUR)
- {
- if (haudio->control.unit == AUDIO_OUT_STREAMING_CTRL)
- {
- ((USBD_AUDIO_ItfTypeDef *)pdev->pUserData[pdev->classId])->VolumeCtl(VOL_CUR);
-
- haudio->control.cmd = 0U;
- haudio->control.len = 0U;
- haudio->control.unit = 0;
- haudio->control.data[0]=0;
- haudio->control.data[0]=0;
- }
- }
-
- return USBD_OK;
-}
-
-/**
- * @brief USBD_AUDIO_EP0_TxReady
- * handle EP0 TRx Ready event
- * @param pdev: device instance
- * @retval status
- */
-static uint8_t USBD_AUDIO_EP0_TxReady(USBD_HandleTypeDef *pdev)
-{
- UNUSED(pdev);
-
- /* Only OUT control data are processed */
- return USBD_OK;
-}
-
-/**
- * @brief USBD_AUDIO_SOF
- * handle SOF event
- * @param pdev: device instance
- * @retval status
- */
-static uint8_t USBD_AUDIO_SOF(USBD_HandleTypeDef *pdev)
-{
- UNUSED(pdev);
-
- return USBD_OK;
-}
-
-/**
- * @brief USBD_AUDIO_IsoINIncomplete
- * handle data ISO IN Incomplete event
- * @param pdev: device instance
- * @param epnum: endpoint index
- * @retval status
- */
-static uint8_t USBD_AUDIO_IsoINIncomplete(USBD_HandleTypeDef *pdev, uint8_t epnum)
-{
- UNUSED(pdev);
-
- return USBD_OK;
-}
-
-/**
- * @brief USBD_AUDIO_IsoOutIncomplete
- * handle data ISO OUT Incomplete event
- * @param pdev: device instance
- * @param epnum: endpoint index
- * @retval status
- */
-static uint8_t USBD_AUDIO_IsoOutIncomplete(USBD_HandleTypeDef *pdev, uint8_t epnum)
-{
- UNUSED(pdev);
-
- return USBD_OK;
-}
-
-/**
- * @brief USBD_AUDIO_DataOut
- * handle data OUT Stage
- * @param pdev: device instance
- * @param epnum: endpoint index
- * @retval status
- */
-static uint8_t USBD_AUDIO_DataOut(USBD_HandleTypeDef *pdev, uint8_t epnum)
-{
- UNUSED(pdev);
-
- return USBD_OK;
-}
-
-/**
- * @brief DeviceQualifierDescriptor
- * return Device Qualifier descriptor
- * @param length : pointer data length
- * @retval pointer to descriptor buffer
- */
-static uint8_t *USBD_AUDIO_GetDeviceQualifierDesc(uint16_t *length)
-{
- *length = sizeof (USBD_AUDIO_DeviceQualifierDesc);
- return USBD_AUDIO_DeviceQualifierDesc;
-}
-
-/**
- * @brief AUDIO_REQ_GetMaximum
- * Handles the VOL_MAX Audio control request.
- * @param pdev: instance
- * @param req: setup class request
- * @retval status
- */
-static void AUDIO_REQ_GetMaximum(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
-{
- USBD_AUDIO_HandleTypeDef *haudio;
-
- haudio = (USBD_AUDIO_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId];
- if (haudio == NULL)
- {
- return;
- }
-
- (haudio->control.data)[0] = (uint16_t)VOL_MAX & 0xFF;
- (haudio->control.data)[1] = ((uint16_t)VOL_MAX & 0xFF00 ) >> 8;
-
- USBD_CtlSendData (pdev,
- haudio->control.data,
- req->wLength);
-}
-
-/**
- * @brief AUDIO_REQ_GetMinimum
- * Handles the VOL_MIN Audio control request.
- * @param pdev: instance
- * @param req: setup class request
- * @retval status
- */
-static void AUDIO_REQ_GetMinimum(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
-{
- USBD_AUDIO_HandleTypeDef *haudio;
-
- haudio = (USBD_AUDIO_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId];
- if (haudio == NULL)
- {
- return;
- }
-
- (haudio->control.data)[0] = (uint16_t)VOL_MIN & 0xFF;
- (haudio->control.data)[1] = ((uint16_t)VOL_MIN & 0xFF00 ) >> 8;
-
- /* Send the current mute state */
- USBD_CtlSendData (pdev,
- haudio->control.data,
- req->wLength);
-}
-
-/**
- * @brief AUDIO_Req_GetResolution
- * Handles the VOL_RES Audio control request.
- * @param pdev: instance
- * @param req: setup class request
- * @retval status
- */
-static void AUDIO_REQ_GetResolution(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
-{
- USBD_AUDIO_HandleTypeDef *haudio;
-
- haudio = (USBD_AUDIO_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId];
- if (haudio == NULL)
- {
- return;
- }
-
- (haudio->control.data)[0] = (uint16_t)VOL_RES & 0xFF;
- (haudio->control.data)[1] = ((uint16_t)VOL_RES & 0xFF00 ) >> 8;
-
- USBD_CtlSendData (pdev,
- haudio->control.data,
- req->wLength);
-}
-
-/**
- * @brief AUDIO_Req_GetCurrent
- * Handles the GET_CUR Audio control request.
- * @param pdev: instance
- * @param req: setup class request
- * @retval status
- */
-static void AUDIO_REQ_GetCurrent(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
-{
- USBD_AUDIO_HandleTypeDef *haudio;
-
- haudio = (USBD_AUDIO_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId];
- if (haudio == NULL)
- {
- return;
- }
-
- (haudio->control.data)[0] = (uint16_t)VOL_CUR & 0xFF;
- (haudio->control.data)[1] = ((uint16_t)VOL_CUR & 0xFF00 ) >> 8;
-
- USBD_CtlSendData (pdev,
- haudio->control.data,
- req->wLength);
-}
-
-/**
- * @brief AUDIO_Req_SetCurrent
- * Handles the SET_CUR Audio control request.
- * @param pdev: instance
- * @param req: setup class request
- * @retval status
- */
-static void AUDIO_REQ_SetCurrent(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req)
-{
- USBD_AUDIO_HandleTypeDef *haudio;
-
- haudio = (USBD_AUDIO_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId];
- if (haudio == NULL)
- {
- return;
- }
-
- if (req->wLength)
- {
- /* Prepare the reception of the buffer over EP0 */
- USBD_CtlPrepareRx (pdev,
- (uint8_t *)&VOL_CUR,
- req->wLength);
-
- haudio->control.cmd = AUDIO_REQ_SET_CUR; /* Set the request value */
- haudio->control.len = req->wLength; /* Set the request data length */
- haudio->control.unit = HIBYTE(req->wIndex); /* Set the request target unit */
- }
-}
-
-/**
- * @}
- */
-
-/** @defgroup USBD_AUDIO_IN_Exported_Functions
- * @{
- */
-
-/**
- * @brief USBD_AUDIO_Data_Transfer
- * Fills the USB internal buffer with audio data from user
- * @param pdev: device instance
- * @param audioData: audio data to be sent via USB
- * @param dataAmount: number of PCM samples to be copied
- * @note Depending on the calling frequency, a coherent amount of samples must be passed to
- * the function. E.g.: assuming a Sampling frequency of 16 KHz and 1 channel,
- * you can pass 16 PCM samples if the function is called each millisecond,
- * 32 samples if called every 2 milliseconds and so on.
- * @retval status
- */
-uint8_t USBD_AUDIO_Data_Transfer(USBD_HandleTypeDef *pdev, int16_t * audioData, uint16_t PCMSamples)
-{
- USBD_AUDIO_HandleTypeDef *haudio;
-
- haudio = (USBD_AUDIO_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId];
- if (haudio == NULL)
- {
- return USBD_FAIL;
- }
-
- if(haudio->state==STATE_USB_WAITING_FOR_INIT)
- {
- return USBD_BUSY;
- }
-
- uint16_t dataAmount = PCMSamples * 2; /*Bytes*/
- uint16_t true_dim = haudio->buffer_length;
- uint16_t current_data_Amount = haudio->dataAmount;
- uint16_t packet_dim = haudio->paketDimension;
-
- if(haudio->state==STATE_USB_REQUESTS_STARTED || current_data_Amount!=dataAmount)
- {
- /* USB parameters definition, based on the amount of data passed */
- haudio->dataAmount=dataAmount;
- uint16_t wr_rd_offset = (AUDIO_IN_PACKET_NUM/2) * dataAmount / packet_dim;
- haudio->wr_ptr=wr_rd_offset * packet_dim;
- haudio->rd_ptr = 0;
- haudio->upper_treshold = wr_rd_offset + 1;
- haudio->lower_treshold = wr_rd_offset - 1;
- haudio->buffer_length = (packet_dim * (dataAmount / packet_dim) * AUDIO_IN_PACKET_NUM);
-
- /* Memory allocation for data buffer, depending (also) on data amount passed to the transfer function */
- if(haudio->buffer != NULL)
- {
- USBD_free(haudio->buffer);
- }
-
- haudio->buffer = USBD_malloc(haudio->buffer_length + haudio->dataAmount);
- if(haudio->buffer == NULL)
- {
- return USBD_FAIL;
- }
-
- memset(haudio->buffer,0,(haudio->buffer_length + haudio->dataAmount));
- haudio->state=STATE_USB_BUFFER_WRITE_STARTED;
- }
- else if(haudio->state==STATE_USB_BUFFER_WRITE_STARTED)
- {
- if(haudio->timeout++==TIMEOUT_VALUE)
- {
- haudio->state=STATE_USB_IDLE;
- ((USBD_AUDIO_ItfTypeDef *)pdev->pUserData[pdev->classId])->Stop();
- haudio->timeout=0;
- }
-
- memcpy((uint8_t *)&haudio->buffer[haudio->wr_ptr], (uint8_t *)(audioData), dataAmount);
- haudio->wr_ptr += dataAmount;
- haudio->wr_ptr = haudio->wr_ptr % (true_dim);
- if((haudio->wr_ptr-dataAmount) == 0)
- {
- memcpy((uint8_t *)(((uint8_t *)haudio->buffer)+true_dim),(uint8_t *)haudio->buffer, dataAmount);
- }
- }
-
- return USBD_OK;
-}
-
-
-/**
- * @brief USBD_AUDIO_RegisterInterface
- * @param fops: Audio interface callback
- * @retval status
- */
-uint8_t USBD_AUDIO_RegisterInterface (USBD_HandleTypeDef *pdev,
- USBD_AUDIO_ItfTypeDef *fops)
-{
- if(fops != NULL)
- {
- pdev->pUserData[pdev->classId] = fops;
- }
- return 0;
-}
-
-/**
- * @brief Configures the microphone descriptor on the base of the frequency
- * and channels number information. These parameters will be used to
- * init the audio engine, through the USB interface functions.
- * @param samplingFrequency: sampling frequency
- * @param Channels: number of channels
- * @retval status
- */
-void USBD_AUDIO_Init_Microphone_Descriptor(USBD_HandleTypeDef *pdev, uint32_t samplingFrequency, uint8_t Channels)
-{
- uint16_t index;
- uint8_t AUDIO_CONTROLS;
- USBD_AUDIO_CfgDesc[0] = 0x09; /* bLength */
- USBD_AUDIO_CfgDesc[1] = 0x02; /* bDescriptorType */
- USBD_AUDIO_CfgDesc[2] = ((USB_AUDIO_CONFIG_DESC_SIZ+Channels-1)&0xff); /* wTotalLength */
- USBD_AUDIO_CfgDesc[3] = ((USB_AUDIO_CONFIG_DESC_SIZ+Channels-1)>>8);
- USBD_AUDIO_CfgDesc[4] = 0x02; /* bNumInterfaces */
- USBD_AUDIO_CfgDesc[5] = 0x01; /* bConfigurationValue */
- USBD_AUDIO_CfgDesc[6] = 0x00; /* iConfiguration */
- USBD_AUDIO_CfgDesc[7] = 0x80; /* bmAttributes BUS Powered*/
- USBD_AUDIO_CfgDesc[8] = 0x32; /* bMaxPower = 100 mA*/
- /* USB Microphone Standard interface descriptor */
- USBD_AUDIO_CfgDesc[9] = 9; /* bLength */
- USBD_AUDIO_CfgDesc[10] = USB_INTERFACE_DESCRIPTOR_TYPE; /* bDescriptorType */
- USBD_AUDIO_CfgDesc[11] = 0x00; /* bInterfaceNumber */
- USBD_AUDIO_CfgDesc[12] = 0x00; /* bAlternateSetting */
- USBD_AUDIO_CfgDesc[13] = 0x00; /* bNumEndpoints */
- USBD_AUDIO_CfgDesc[14] = USB_DEVICE_CLASS_AUDIO; /* bInterfaceClass */
- USBD_AUDIO_CfgDesc[15] = AUDIO_SUBCLASS_AUDIOCONTROL; /* bInterfaceSubClass */
- USBD_AUDIO_CfgDesc[16] = AUDIO_PROTOCOL_UNDEFINED; /* bInterfaceProtocol */
- USBD_AUDIO_CfgDesc[17] = 0x00; /* iInterface */
- /* USB Microphone Class-specific AC Interface Descriptor */
- USBD_AUDIO_CfgDesc[18] = 9; /* bLength */
- USBD_AUDIO_CfgDesc[19] = AUDIO_INTERFACE_DESCRIPTOR_TYPE; /* bDescriptorType */
- USBD_AUDIO_CfgDesc[20] = AUDIO_CONTROL_HEADER; /* bDescriptorSubtype */
- USBD_AUDIO_CfgDesc[21] = 0x00; /* 1.00 */ /* bcdADC */
- USBD_AUDIO_CfgDesc[22] = 0x01;
- USBD_AUDIO_CfgDesc[23] = 0x25+Channels; /* wTotalLength = 37+AUDIO_CHANNELS*/
- USBD_AUDIO_CfgDesc[24] = 0x00;
- USBD_AUDIO_CfgDesc[25] = 0x01; /* bInCollection */
- USBD_AUDIO_CfgDesc[26] = 0x01; /* baInterfaceNr */
- /* USB Microphone Input Terminal Descriptor */
- USBD_AUDIO_CfgDesc[27] = AUDIO_INPUT_TERMINAL_DESC_SIZE; /* bLength */
- USBD_AUDIO_CfgDesc[28] = AUDIO_INTERFACE_DESCRIPTOR_TYPE; /* bDescriptorType */
- USBD_AUDIO_CfgDesc[29] = AUDIO_CONTROL_INPUT_TERMINAL; /* bDescriptorSubtype */
- USBD_AUDIO_CfgDesc[30] = 0x01; /* bTerminalID */
- USBD_AUDIO_CfgDesc[31] = 0x01; /* wTerminalType AUDIO_TERMINAL_USB_MICROPHONE 0x0201 */
- USBD_AUDIO_CfgDesc[32] = 0x02;
- USBD_AUDIO_CfgDesc[33] = 0x00; /* bAssocTerminal */
- USBD_AUDIO_CfgDesc[34] = Channels; /* bNrChannels */
- if(Channels != 2)
- {
- USBD_AUDIO_CfgDesc[35] = 0x00; /* wChannelConfig 0x0000 Mono */
- USBD_AUDIO_CfgDesc[36] = 0x00;
- }
- else
- {
- USBD_AUDIO_CfgDesc[35] = 0x03; /* wChannelConfig 0x0003 Stereo */
- USBD_AUDIO_CfgDesc[36] = 0x00;
- }
- USBD_AUDIO_CfgDesc[37] = 0x00; /* iChannelNames */
- USBD_AUDIO_CfgDesc[38] = 0x00; /* iTerminal */
- /* USB Microphone Audio Feature Unit Descriptor */
- USBD_AUDIO_CfgDesc[39] = 0x07+Channels+1; /* bLength */
- USBD_AUDIO_CfgDesc[40] = AUDIO_INTERFACE_DESCRIPTOR_TYPE; /* bDescriptorType */
- USBD_AUDIO_CfgDesc[41] = AUDIO_CONTROL_FEATURE_UNIT; /* bDescriptorSubtype */
- USBD_AUDIO_CfgDesc[42] = 0x02; /* bUnitID */
- USBD_AUDIO_CfgDesc[43] = 0x01; /* bSourceID */
- USBD_AUDIO_CfgDesc[44] = 0x01; /* bControlSize */
- index = 47;
- if(Channels == 1)
- {
- AUDIO_CONTROLS = (0x02);
- USBD_AUDIO_CfgDesc[45] = AUDIO_CONTROLS;
- USBD_AUDIO_CfgDesc[46] = 0x00;
- }
- else
- {
- AUDIO_CONTROLS = (0x02);
- USBD_AUDIO_CfgDesc[45] = 0x00;
- USBD_AUDIO_CfgDesc[46] = AUDIO_CONTROLS;
- USBD_AUDIO_CfgDesc[index] = AUDIO_CONTROLS;
- index++;
- }
- if(Channels > 2)
- {
- USBD_AUDIO_CfgDesc[index] = AUDIO_CONTROLS;
- index++;
- }
- if(Channels > 3)
- {
- USBD_AUDIO_CfgDesc[index] = AUDIO_CONTROLS;
- index++;
- }
- if(Channels > 4)
- {
- USBD_AUDIO_CfgDesc[index] = AUDIO_CONTROLS;
- index++;
- }
- if(Channels > 5)
- {
- USBD_AUDIO_CfgDesc[index] = AUDIO_CONTROLS;
- index++;
- }
- if(Channels > 6)
- {
- USBD_AUDIO_CfgDesc[index] = AUDIO_CONTROLS;
- index++;
- }
- if(Channels > 7)
- {
- USBD_AUDIO_CfgDesc[index] = AUDIO_CONTROLS;
- index++;
- }
- USBD_AUDIO_CfgDesc[index] = 0x00; /* iTerminal */
- index++;
- /*USB Microphone Output Terminal Descriptor */
- USBD_AUDIO_CfgDesc[index++] = 0x09; /* bLength */
- USBD_AUDIO_CfgDesc[index++] = AUDIO_INTERFACE_DESCRIPTOR_TYPE; /* bDescriptorType */
- USBD_AUDIO_CfgDesc[index++] = AUDIO_CONTROL_OUTPUT_TERMINAL; /* bDescriptorSubtype */
- USBD_AUDIO_CfgDesc[index++] = 0x03; /* bTerminalID */
- USBD_AUDIO_CfgDesc[index++] = 0x01; /* wTerminalType AUDIO_TERMINAL_USB_STREAMING 0x0101*/
- USBD_AUDIO_CfgDesc[index++] = 0x01;
- USBD_AUDIO_CfgDesc[index++] = 0x00;
- USBD_AUDIO_CfgDesc[index++] = 0x02;
- USBD_AUDIO_CfgDesc[index++] = 0x00;
- /* USB Microphone Standard AS Interface Descriptor - Audio Streaming Zero Bandwidth */
- /* Interface 1, Alternate Setting 0 */
- USBD_AUDIO_CfgDesc[index++] = 9; /* bLength */
- USBD_AUDIO_CfgDesc[index++] = USB_INTERFACE_DESCRIPTOR_TYPE; /* bDescriptorType */
- USBD_AUDIO_CfgDesc[index++] = 0x01; /* bInterfaceNumber */
- USBD_AUDIO_CfgDesc[index++] = 0x00; /* bAlternateSetting */
- USBD_AUDIO_CfgDesc[index++] = 0x00; /* bNumEndpoints */
- USBD_AUDIO_CfgDesc[index++] = USB_DEVICE_CLASS_AUDIO; /* bInterfaceClass */
- USBD_AUDIO_CfgDesc[index++] = AUDIO_SUBCLASS_AUDIOSTREAMING; /* bInterfaceSubClass */
- USBD_AUDIO_CfgDesc[index++] = AUDIO_PROTOCOL_UNDEFINED; /* bInterfaceProtocol */
- USBD_AUDIO_CfgDesc[index++] = 0x00;
- /* USB Microphone Standard AS Interface Descriptor - Audio Streaming Operational */
- /* Interface 1, Alternate Setting 1 */
- USBD_AUDIO_CfgDesc[index++] = 9; /* bLength */
- USBD_AUDIO_CfgDesc[index++] = USB_INTERFACE_DESCRIPTOR_TYPE; /* bDescriptorType */
- USBD_AUDIO_CfgDesc[index++] = 0x01; /* bInterfaceNumber */
- USBD_AUDIO_CfgDesc[index++] = 0x01; /* bAlternateSetting */
- USBD_AUDIO_CfgDesc[index++] = 0x01; /* bNumEndpoints */
- USBD_AUDIO_CfgDesc[index++] = USB_DEVICE_CLASS_AUDIO; /* bInterfaceClass */
- USBD_AUDIO_CfgDesc[index++] = AUDIO_SUBCLASS_AUDIOSTREAMING; /* bInterfaceSubClass */
- USBD_AUDIO_CfgDesc[index++] = AUDIO_PROTOCOL_UNDEFINED; /* bInterfaceProtocol */
- USBD_AUDIO_CfgDesc[index++] = 0x00; /* iInterface */
- /* USB Microphone Audio Streaming Interface Descriptor */
- USBD_AUDIO_CfgDesc[index++] = AUDIO_STREAMING_INTERFACE_DESC_SIZE; /* bLength */
- USBD_AUDIO_CfgDesc[index++] = AUDIO_INTERFACE_DESCRIPTOR_TYPE; /* bDescriptorType */
- USBD_AUDIO_CfgDesc[index++] = AUDIO_STREAMING_GENERAL; /* bDescriptorSubtype */
- USBD_AUDIO_CfgDesc[index++] = 0x03; /* bTerminalLink */
- USBD_AUDIO_CfgDesc[index++] = 0x01; /* bDelay */
- USBD_AUDIO_CfgDesc[index++] = 0x01; /* wFormatTag AUDIO_FORMAT_PCM 0x0001*/
- USBD_AUDIO_CfgDesc[index++] = 0x00;
- /* USB Microphone Audio Type I Format Interface Descriptor */
- USBD_AUDIO_CfgDesc[index++] = 0x0B; /* bLength */
- USBD_AUDIO_CfgDesc[index++] = AUDIO_INTERFACE_DESCRIPTOR_TYPE; /* bDescriptorType */
- USBD_AUDIO_CfgDesc[index++] = AUDIO_STREAMING_FORMAT_TYPE; /* bDescriptorSubtype */
- USBD_AUDIO_CfgDesc[index++] = AUDIO_FORMAT_TYPE_I; /* bFormatType */
- USBD_AUDIO_CfgDesc[index++] = Channels; /* bNrChannels */
- USBD_AUDIO_CfgDesc[index++] = 0x02; /* bSubFrameSize */
- USBD_AUDIO_CfgDesc[index++] = 16; /* bBitResolution */
- USBD_AUDIO_CfgDesc[index++] = 0x01; /* bSamFreqType */
- USBD_AUDIO_CfgDesc[index++] = samplingFrequency&0xff; /* tSamFreq 8000 = 0x1F40 */
- USBD_AUDIO_CfgDesc[index++] = (samplingFrequency>>8)&0xff;
- USBD_AUDIO_CfgDesc[index++] = samplingFrequency>>16;
- /* Endpoint 1 - Standard Descriptor */
- USBD_AUDIO_CfgDesc[index++] = AUDIO_STANDARD_ENDPOINT_DESC_SIZE; /* bLength */
- USBD_AUDIO_CfgDesc[index++] = 0x05; /* bDescriptorType */
- USBD_AUDIO_CfgDesc[index++] = AUDIO_IN_EP; /* bEndpointAddress 1 in endpoint*/
- USBD_AUDIO_CfgDesc[index++] = 0x05; /* bmAttributes */
- USBD_AUDIO_CfgDesc[index++] = ((samplingFrequency/1000+2)*Channels*2)&0xFF; /* wMaxPacketSize */
- USBD_AUDIO_CfgDesc[index++] = ((samplingFrequency/1000+2)*Channels*2)>>8;
- USBD_AUDIO_CfgDesc[index++] = 0x01; /* bInterval */
- USBD_AUDIO_CfgDesc[index++] = 0x00; /* bRefresh */
- USBD_AUDIO_CfgDesc[index++] = 0x00; /* bSynchAddress */
- /* Endpoint - Audio Streaming Descriptor*/
- USBD_AUDIO_CfgDesc[index++] = AUDIO_STREAMING_ENDPOINT_DESC_SIZE; /* bLength */
- USBD_AUDIO_CfgDesc[index++] = AUDIO_ENDPOINT_DESCRIPTOR_TYPE; /* bDescriptorType */
- USBD_AUDIO_CfgDesc[index++] = AUDIO_ENDPOINT_GENERAL; /* bDescriptor */
- USBD_AUDIO_CfgDesc[index++] = 0x00; /* bmAttributes */
- USBD_AUDIO_CfgDesc[index++] = 0x00; /* bLockDelayUnits */
- USBD_AUDIO_CfgDesc[index++] = 0x00; /* wLockDelay */
- USBD_AUDIO_CfgDesc[index++] = 0x00;
-
- haudioInstance.paketDimension = (samplingFrequency/1000*Channels*2);
- haudioInstance.frequency=samplingFrequency;
- haudioInstance.buffer_length = haudioInstance.paketDimension * AUDIO_IN_PACKET_NUM;
- haudioInstance.channels=Channels;
- haudioInstance.upper_treshold = 5;
- haudioInstance.lower_treshold = 2;
- haudioInstance.state = STATE_USB_WAITING_FOR_INIT;
- haudioInstance.wr_ptr = 3 * haudioInstance.paketDimension;
- haudioInstance.rd_ptr = 0;
- haudioInstance.dataAmount=0;
- haudioInstance.buffer = 0;
-}
-
-/**
- * @}
- */
-
-/**
- * @}
- */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/usb/usbd_conf.c b/Projects/STM32WB5MM-DK/Examples/BSP/Src/usb/usbd_conf.c
deleted file mode 100644
index ada7333b7..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/usb/usbd_conf.c
+++ /dev/null
@@ -1,513 +0,0 @@
-/**
- ******************************************************************************
- * @file usbd_conf.c
- * @author MCD Application Team
- * @brief This file implements the USB Device library callbacks and MSP
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2020-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Includes ------------------------------------------------- --------------- */
-#include "stm32wbxx_hal.h"
-#include "usbd_core.h"
-
-/* Private typedef ---------------------------------------------------------- */
-/* Private define ----------------------------------------------------------- */
-#define CURSOR_STEP 5
-/* Private macro ------------------------------------------------------------ */
-/* Private variables -------------------------------------------------------- */
-PCD_HandleTypeDef hpcd;
-__IO uint32_t remotewakeupon = 0;
-uint8_t HID_Buffer[4];
-extern USBD_HandleTypeDef USBD_Device;
-
-/* Private function prototypes ---------------------------------------------- */
-static void SystemClockConfig_STOP(void);
-
-/* Private functions -------------------------------------------------------- */
-
-/*******************************************************************************
- PCD BSP Routines
-*******************************************************************************/
-
-/**
- * @brief Initializes the PCD MSP.
- * @param hpcd: PCD handle
- * @retval None
- */
-void HAL_PCD_MspInit(PCD_HandleTypeDef * hpcd)
-{
- GPIO_InitTypeDef GPIO_InitStruct;
-
- /* Enable the GPIOA clock */
- __HAL_RCC_GPIOA_CLK_ENABLE();
-
- /* Configure USB DM and DP pins */
- GPIO_InitStruct.Pin = (GPIO_PIN_11 | GPIO_PIN_12);
- GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
- HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
-
- /* Enable USB FS Clock */
- __HAL_RCC_USB_CLK_ENABLE();
-
-
- if (hpcd->Init.low_power_enable == 1)
- {
- /* Enable EXTI Line 18 for USB wakeup */
- __HAL_USB_WAKEUP_EXTI_ENABLE_IT();
-
- /* USB Default Wakeup Interrupt */
- HAL_NVIC_EnableIRQ(USB_LP_IRQn);
-
- /* Enable USB Wake-up interrupt */
- HAL_NVIC_SetPriority(USB_LP_IRQn, 0, 0);
- }
-
- /* Set USB FS Interrupt priority */
- HAL_NVIC_SetPriority(USB_LP_IRQn, 0x00, 0);
-
- /* Enable USB FS Interrupt */
- HAL_NVIC_EnableIRQ(USB_LP_IRQn);
-}
-
-/**
- * @brief De-Initializes the PCD MSP.
- * @param hpcd: PCD handle
- * @retval None
- */
-void HAL_PCD_MspDeInit(PCD_HandleTypeDef * hpcd)
-{
- /* Disable USB FS Clock */
- __HAL_RCC_USB_CLK_DISABLE();
-}
-
-/*******************************************************************************
- LL Driver Callbacks (PCD -> USB Device Library)
-*******************************************************************************/
-
-/**
- * @brief SetupStage callback.
- * @param hpcd: PCD handle
- * @retval None
- */
-void HAL_PCD_SetupStageCallback(PCD_HandleTypeDef * hpcd)
-{
- USBD_LL_SetupStage(hpcd->pData, (uint8_t *) hpcd->Setup);
-}
-
-/**
- * @brief DataOut Stage callback.
- * @param hpcd: PCD handle
- * @param epnum: Endpoint Number
- * @retval None
- */
-void HAL_PCD_DataOutStageCallback(PCD_HandleTypeDef * hpcd, uint8_t epnum)
-{
- USBD_LL_DataOutStage(hpcd->pData, epnum, hpcd->OUT_ep[epnum].xfer_buff);
-}
-
-/**
- * @brief DataIn Stage callback.
- * @param hpcd: PCD handle
- * @param epnum: Endpoint Number
- * @retval None
- */
-void HAL_PCD_DataInStageCallback(PCD_HandleTypeDef * hpcd, uint8_t epnum)
-{
- USBD_LL_DataInStage(hpcd->pData, epnum, hpcd->IN_ep[epnum].xfer_buff);
-}
-
-/**
- * @brief SOF callback.
- * @param hpcd: PCD handle
- * @retval None
- */
-void HAL_PCD_SOFCallback(PCD_HandleTypeDef * hpcd)
-{
- USBD_LL_SOF(hpcd->pData);
-}
-
-/**
- * @brief Reset callback.
- * @param hpcd: PCD handle
- * @retval None
- */
-void HAL_PCD_ResetCallback(PCD_HandleTypeDef * hpcd)
-{
- /* Reset Device */
- USBD_LL_Reset(hpcd->pData);
-
- /* Set USB Current Speed */
- USBD_LL_SetSpeed(hpcd->pData, USBD_SPEED_FULL);
-}
-
-/**
- * @brief Suspend callback.
- * @param hpcd: PCD handle
- * @retval None
- */
-void HAL_PCD_SuspendCallback(PCD_HandleTypeDef * hpcd)
-{
- /* Inform USB library that core enters in suspend Mode */
- USBD_LL_Suspend(hpcd->pData);
-
- /* Enter in STOP mode */
- if (hpcd->Init.low_power_enable)
- {
- HAL_PWR_EnterSTOPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI);
- }
-}
-
-/**
- * @brief Resume callback.
- * @param hpcd: PCD handle
- * @retval None
- */
-void HAL_PCD_ResumeCallback(PCD_HandleTypeDef * hpcd)
-{
- if ((hpcd->Init.low_power_enable) && (remotewakeupon == 0))
- {
- /* restore system and USB CLK */
- SystemClockConfig_STOP();
- }
- USBD_LL_Resume(hpcd->pData);
-
- remotewakeupon = 0;
-}
-
-/**
- * @brief ISOOUTIncomplete callback.
- * @param hpcd: PCD handle
- * @param epnum: Endpoint Number
- * @retval None
- */
-void HAL_PCD_ISOOUTIncompleteCallback(PCD_HandleTypeDef * hpcd, uint8_t epnum)
-{
- USBD_LL_IsoOUTIncomplete(hpcd->pData, epnum);
-}
-
-/**
- * @brief ISOINIncomplete callback.
- * @param hpcd: PCD handle
- * @param epnum: Endpoint Number
- * @retval None
- */
-void HAL_PCD_ISOINIncompleteCallback(PCD_HandleTypeDef * hpcd, uint8_t epnum)
-{
- USBD_LL_IsoINIncomplete(hpcd->pData, epnum);
-}
-
-/**
- * @brief ConnectCallback callback.
- * @param hpcd: PCD handle
- * @retval None
- */
-void HAL_PCD_ConnectCallback(PCD_HandleTypeDef * hpcd)
-{
- USBD_LL_DevConnected(hpcd->pData);
-}
-
-/**
- * @brief Disconnect callback.
- * @param hpcd: PCD handle
- * @retval None
- */
-void HAL_PCD_DisconnectCallback(PCD_HandleTypeDef * hpcd)
-{
- USBD_LL_DevDisconnected(hpcd->pData);
-}
-
-/*******************************************************************************
- LL Driver Interface (USB Device Library --> PCD)
-*******************************************************************************/
-
-/**
- * @brief Initializes the Low Level portion of the Device driver.
- * @param pdev: Device handle
- * @retval USBD Status
- */
-USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef * pdev)
-{
- /* Set LL Driver parameters */
- hpcd.Instance = USB;
- hpcd.Init.dev_endpoints = 4;
- hpcd.Init.ep0_mps = PCD_EP0MPS_64;
- hpcd.Init.phy_itface = PCD_PHY_EMBEDDED;
- hpcd.Init.speed = PCD_SPEED_FULL;
- hpcd.Init.low_power_enable = 0;
- /* Link The driver to the stack */
- hpcd.pData = pdev;
- pdev->pData = &hpcd;
- /* Initialize LL Driver */
- HAL_PCD_Init(&hpcd);
-
- HAL_PCDEx_PMAConfig(pdev->pData , 0x00 , PCD_SNG_BUF, 0x40);
- HAL_PCDEx_PMAConfig(pdev->pData , 0x80 , PCD_SNG_BUF, 0x80);
- HAL_PCDEx_PMAConfig(pdev->pData , 0x81 , PCD_DBL_BUF, 0x01C00120);
-
- return USBD_OK;
-}
-
-/**
- * @brief De-Initializes the Low Level portion of the Device driver.
- * @param pdev: Device handle
- * @retval USBD Status
- */
-USBD_StatusTypeDef USBD_LL_DeInit(USBD_HandleTypeDef * pdev)
-{
- HAL_PCD_DeInit(pdev->pData);
- return USBD_OK;
-}
-
-/**
- * @brief Starts the Low Level portion of the Device driver.
- * @param pdev: Device handle
- * @retval USBD Status
- */
-USBD_StatusTypeDef USBD_LL_Start(USBD_HandleTypeDef * pdev)
-{
- HAL_PCD_Start(pdev->pData);
- return USBD_OK;
-}
-
-/**
- * @brief Stops the Low Level portion of the Device driver.
- * @param pdev: Device handle
- * @retval USBD Status
- */
-USBD_StatusTypeDef USBD_LL_Stop(USBD_HandleTypeDef * pdev)
-{
- HAL_PCD_Stop(pdev->pData);
- return USBD_OK;
-}
-
-/**
- * @brief Opens an endpoint of the Low Level Driver.
- * @param pdev: Device handle
- * @param ep_addr: Endpoint Number
- * @param ep_type: Endpoint Type
- * @param ep_mps: Endpoint Max Packet Size
- * @retval USBD Status
- */
-USBD_StatusTypeDef USBD_LL_OpenEP(USBD_HandleTypeDef * pdev,
- uint8_t ep_addr,
- uint8_t ep_type, uint16_t ep_mps)
-{
- HAL_PCD_EP_Open(pdev->pData, ep_addr, ep_mps, ep_type);
-
- return USBD_OK;
-}
-
-/**
- * @brief Closes an endpoint of the Low Level Driver.
- * @param pdev: Device handle
- * @param ep_addr: Endpoint Number
- * @retval USBD Status
- */
-USBD_StatusTypeDef USBD_LL_CloseEP(USBD_HandleTypeDef * pdev, uint8_t ep_addr)
-{
- HAL_PCD_EP_Close(pdev->pData, ep_addr);
- return USBD_OK;
-}
-
-/**
- * @brief Flushes an endpoint of the Low Level Driver.
- * @param pdev: Device handle
- * @param ep_addr: Endpoint Number
- * @retval USBD Status
- */
-USBD_StatusTypeDef USBD_LL_FlushEP(USBD_HandleTypeDef * pdev, uint8_t ep_addr)
-{
- HAL_PCD_EP_Flush(pdev->pData, ep_addr);
- return USBD_OK;
-}
-
-/**
- * @brief Sets a Stall condition on an endpoint of the Low Level Driver.
- * @param pdev: Device handle
- * @param ep_addr: Endpoint Number
- * @retval USBD Status
- */
-USBD_StatusTypeDef USBD_LL_StallEP(USBD_HandleTypeDef * pdev, uint8_t ep_addr)
-{
- HAL_PCD_EP_SetStall(pdev->pData, ep_addr);
- return USBD_OK;
-}
-
-/**
- * @brief Clears a Stall condition on an endpoint of the Low Level Driver.
- * @param pdev: Device handle
- * @param ep_addr: Endpoint Number
- * @retval USBD Status
- */
-USBD_StatusTypeDef USBD_LL_ClearStallEP(USBD_HandleTypeDef * pdev,
- uint8_t ep_addr)
-{
- HAL_PCD_EP_ClrStall(pdev->pData, ep_addr);
- return USBD_OK;
-}
-
-/**
- * @brief Returns Stall condition.
- * @param pdev: Device handle
- * @param ep_addr: Endpoint Number
- * @retval Stall (1: Yes, 0: No)
- */
-uint8_t USBD_LL_IsStallEP(USBD_HandleTypeDef * pdev, uint8_t ep_addr)
-{
- PCD_HandleTypeDef *hpcd = pdev->pData;
-
- if ((ep_addr & 0x80) == 0x80)
- {
- return hpcd->IN_ep[ep_addr & 0x7F].is_stall;
- }
- else
- {
- return hpcd->OUT_ep[ep_addr & 0x7F].is_stall;
- }
-}
-
-/**
- * @brief Assigns a USB address to the device.
- * @param pdev: Device handle
- * @param ep_addr: Endpoint Number
- * @retval USBD Status
- */
-USBD_StatusTypeDef USBD_LL_SetUSBAddress(USBD_HandleTypeDef * pdev,
- uint8_t dev_addr)
-{
- HAL_PCD_SetAddress(pdev->pData, dev_addr);
- return USBD_OK;
-}
-
-/**
- * @brief Transmits data over an endpoint.
- * @param pdev: Device handle
- * @param ep_addr: Endpoint Number
- * @param pbuf: Pointer to data to be sent
- * @param size: Data size
- * @retval USBD Status
- */
-USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef * pdev,
- uint8_t ep_addr,
- uint8_t * pbuf, uint32_t size)
-{
- HAL_PCD_EP_Transmit(pdev->pData, ep_addr, pbuf, size);
- return USBD_OK;
-}
-
-/**
- * @brief Prepares an endpoint for reception.
- * @param pdev: Device handle
- * @param ep_addr: Endpoint Number
- * @param pbuf: Pointer to data to be received
- * @param size: Data size
- * @retval USBD Status
- */
-USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef * pdev,
- uint8_t ep_addr,
- uint8_t * pbuf, uint32_t size)
-{
- HAL_PCD_EP_Receive(pdev->pData, ep_addr, pbuf, size);
- return USBD_OK;
-}
-
-/**
- * @brief Returns the last transferred packet size.
- * @param pdev: Device handle
- * @param ep_addr: Endpoint Number
- * @retval Received Data Size
- */
-uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef * pdev, uint8_t ep_addr)
-{
- return HAL_PCD_EP_GetRxCount(pdev->pData, ep_addr);
-}
-
-/**
- * @brief Configures system clock after wakeup from STOP mode.
- * @param None
- * @retval None
- */
-static void SystemClockConfig_STOP(void)
-{
- RCC_ClkInitTypeDef RCC_ClkInitStruct;
- RCC_OscInitTypeDef RCC_OscInitStruct;
-
- RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSE |
- RCC_OSCILLATORTYPE_MSI;
-
- RCC_OscInitStruct.LSEState = RCC_LSE_ON;
- RCC_OscInitStruct.MSIState = RCC_MSI_ON;
- RCC_OscInitStruct.MSICalibrationValue = 0;
- RCC_OscInitStruct.MSIClockRange = RCC_MSIRANGE_6;
- RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
- RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_MSI;
- RCC_OscInitStruct.PLL.PLLM = 1;
- RCC_OscInitStruct.PLL.PLLN = 40;
- RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV7;
- RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV6;
- RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2;
- HAL_RCC_OscConfig(&RCC_OscInitStruct);
-
- RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK |
- RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
-
- RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
- RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
- RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
- RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
- HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2);
-
-
- /* Enable HSI48 */
- RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48;
- RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
- RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
- HAL_RCC_OscConfig(&RCC_OscInitStruct);
-
- HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq() / 1000);
-
- HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK);
-}
-
-/**
- * @brief Delays routine for the USB Device Library.
- * @param Delay: Delay in ms
- * @retval None
- */
-void USBD_LL_Delay(uint32_t Delay)
-{
- HAL_Delay(Delay);
-}
-
-/**
- * @brief static single allocation.
- * @param size: size of allocated memory
- * @retval None
- */
-void *USBD_static_malloc(uint32_t size)
-{
- static uint32_t mem[MAX_STATIC_ALLOC_SIZE];
- return mem;
-}
-
-/**
- * @brief Dummy memory free
- * @param *p pointer to allocated memory address
- * @retval None
- */
-void USBD_static_free(void *p)
-{
- return;
-}
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/usb/usbd_desc.c b/Projects/STM32WB5MM-DK/Examples/BSP/Src/usb/usbd_desc.c
deleted file mode 100644
index 29f405610..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/usb/usbd_desc.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/**
- ******************************************************************************
- * @file usbd_desc.c
- * @author MCD Application Team
- * @brief This file provides the USBD descriptors and string formatting method.
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2020-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Includes ------------------------------------------------------------------*/
-#include "usbd_core.h"
-#include "usbd_desc.h"
-#include "usbd_conf.h"
-
-/* Private typedef -----------------------------------------------------------*/
-/* Private define ------------------------------------------------------------*/
-#define USBD_VID 0x0483
-#define USBD_PID 0x5735
-#define USBD_LANGID_STRING 0x409
-#define USBD_MANUFACTURER_STRING "STMicroelectronics"
-#define USBD_PRODUCT_HS_STRING "STM32 AUDIO Streaming in HS Mode"
-#define USBD_SERIALNUMBER_HS_STRING "00000000034E"
-#define USBD_PRODUCT_FS_STRING "STM32 AUDIO Streaming in FS Mode"
-#define USBD_SERIALNUMBER_FS_STRING "00000000034F"
-#define USBD_CONFIGURATION_HS_STRING "AUDIO Config"
-#define USBD_INTERFACE_HS_STRING "AUDIO Interface"
-#define USBD_CONFIGURATION_FS_STRING "AUDIO Config"
-#define USBD_INTERFACE_FS_STRING "AUDIO Interface"
-
-/* Private macro -------------------------------------------------------------*/
-/* Private function prototypes -----------------------------------------------*/
-uint8_t *USBD_AUDIO_DeviceDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
-uint8_t *USBD_AUDIO_LangIDStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
-uint8_t *USBD_AUDIO_ManufacturerStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
-uint8_t *USBD_AUDIO_ProductStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
-uint8_t *USBD_AUDIO_SerialStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
-uint8_t *USBD_AUDIO_ConfigStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
-uint8_t *USBD_AUDIO_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length);
-#ifdef USB_SUPPORT_USER_STRING_DESC
-uint8_t *USBD_AUDIO_USRStringDesc(USBD_SpeedTypeDef speed, uint8_t idx, uint16_t *length);
-#endif /* USB_SUPPORT_USER_STRING_DESC */
-
-/* Private variables ---------------------------------------------------------*/
-USBD_DescriptorsTypeDef AUDIO_Desc =
-{
- USBD_AUDIO_DeviceDescriptor,
- USBD_AUDIO_LangIDStrDescriptor,
- USBD_AUDIO_ManufacturerStrDescriptor,
- USBD_AUDIO_ProductStrDescriptor,
- USBD_AUDIO_SerialStrDescriptor,
- USBD_AUDIO_ConfigStrDescriptor,
- USBD_AUDIO_InterfaceStrDescriptor,
-};
-
-/* USB Standard Device Descriptor */
-#if defined ( __ICCARM__ ) /*!< IAR Compiler */
-#pragma data_alignment=4
-#endif
-__ALIGN_BEGIN uint8_t hUSBDDeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END =
-{
- 0x12, /* bLength */
- USB_DESC_TYPE_DEVICE, /* bDescriptorType */
- 0x00, /* bcdUSB */
- 0x02,
- 0x00, /* bDeviceClass */
- 0x00, /* bDeviceSubClass */
- 0x00, /* bDeviceProtocol */
- USB_MAX_EP0_SIZE, /* bMaxPacketSize*/
- LOBYTE(USBD_VID), /* idVendor */
- HIBYTE(USBD_VID), /* idVendor */
- LOBYTE(USBD_PID), /* idVendor */
- HIBYTE(USBD_PID), /* idVendor */
- 0x00, /* bcdDevice rel. 2.00 */
- 0x02,
- USBD_IDX_MFC_STR, /* Index of manufacturer string */
- USBD_IDX_PRODUCT_STR, /* Index of product string */
- USBD_IDX_SERIAL_STR, /* Index of serial number string */
- USBD_MAX_NUM_CONFIGURATION /* bNumConfigurations */
-}; /* USB_DeviceDescriptor */
-
-/* USB Standard Device Descriptor */
-#if defined ( __ICCARM__ ) /*!< IAR Compiler */
-#pragma data_alignment=4
-#endif
-__ALIGN_BEGIN uint8_t USBD_LangIDDesc[USB_LEN_LANGID_STR_DESC] __ALIGN_END =
-{
- USB_LEN_LANGID_STR_DESC,
- USB_DESC_TYPE_STRING,
- LOBYTE(USBD_LANGID_STRING),
- HIBYTE(USBD_LANGID_STRING),
-};
-
-#if defined ( __ICCARM__ ) /*!< IAR Compiler */
-#pragma data_alignment=4
-#endif
-__ALIGN_BEGIN uint8_t USBD_StrDesc[USBD_MAX_STR_DESC_SIZ] __ALIGN_END;
-
-/* Private functions ---------------------------------------------------------*/
-
-/**
- * @brief Returns the device descriptor.
- * @param speed: Current device speed
- * @param length: Pointer to data length variable
- * @retval Pointer to descriptor buffer
- */
-uint8_t *USBD_AUDIO_DeviceDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
-{
- *length = sizeof(hUSBDDeviceDesc);
- return hUSBDDeviceDesc;
-}
-
-/**
- * @brief Returns the LangID string descriptor.
- * @param speed: Current device speed
- * @param length: Pointer to data length variable
- * @retval Pointer to descriptor buffer
- */
-uint8_t *USBD_AUDIO_LangIDStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
-{
- *length = sizeof(USBD_LangIDDesc);
- return USBD_LangIDDesc;
-}
-
-/**
- * @brief Returns the product string descriptor.
- * @param speed: Current device speed
- * @param length: Pointer to data length variable
- * @retval Pointer to descriptor buffer
- */
-uint8_t *USBD_AUDIO_ProductStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
-{
- if(speed == 0)
- {
- USBD_GetString((uint8_t *)USBD_PRODUCT_HS_STRING, USBD_StrDesc, length);
- }
- else
- {
- USBD_GetString((uint8_t *)USBD_PRODUCT_FS_STRING, USBD_StrDesc, length);
- }
- return USBD_StrDesc;
-}
-
-/**
- * @brief Returns the manufacturer string descriptor.
- * @param speed: Current device speed
- * @param length: Pointer to data length variable
- * @retval Pointer to descriptor buffer
- */
-uint8_t *USBD_AUDIO_ManufacturerStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
-{
- USBD_GetString((uint8_t *)USBD_MANUFACTURER_STRING, USBD_StrDesc, length);
- return USBD_StrDesc;
-}
-
-/**
- * @brief Returns the serial number string descriptor.
- * @param speed: Current device speed
- * @param length: Pointer to data length variable
- * @retval Pointer to descriptor buffer
- */
-uint8_t *USBD_AUDIO_SerialStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
-{
- if(speed == USBD_SPEED_HIGH)
- {
- USBD_GetString((uint8_t *)USBD_SERIALNUMBER_HS_STRING, USBD_StrDesc, length);
- }
- else
- {
- USBD_GetString((uint8_t *)USBD_SERIALNUMBER_FS_STRING, USBD_StrDesc, length);
- }
- return USBD_StrDesc;
-}
-
-/**
- * @brief Returns the configuration string descriptor.
- * @param speed: Current device speed
- * @param length: Pointer to data length variable
- * @retval Pointer to descriptor buffer
- */
-uint8_t *USBD_AUDIO_ConfigStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
-{
- if(speed == USBD_SPEED_HIGH)
- {
- USBD_GetString((uint8_t *)USBD_CONFIGURATION_HS_STRING, USBD_StrDesc, length);
- }
- else
- {
- USBD_GetString((uint8_t *)USBD_CONFIGURATION_FS_STRING, USBD_StrDesc, length);
- }
- return USBD_StrDesc;
-}
-
-/**
- * @brief Returns the interface string descriptor.
- * @param speed: Current device speed
- * @param length: Pointer to data length variable
- * @retval Pointer to descriptor buffer
- */
-uint8_t *USBD_AUDIO_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
-{
- if(speed == 0)
- {
- USBD_GetString((uint8_t *)USBD_INTERFACE_HS_STRING, USBD_StrDesc, length);
- }
- else
- {
- USBD_GetString((uint8_t *)USBD_INTERFACE_FS_STRING, USBD_StrDesc, length);
- }
- return USBD_StrDesc;
-}
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api.c b/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api.c
deleted file mode 100644
index 7f01a6588..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api.c
+++ /dev/null
@@ -1,2977 +0,0 @@
-/**
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2019-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-#include "vl53l0x_api.h"
-#include "vl53l0x_tuning.h"
-#include "vl53l0x_interrupt_threshold_settings.h"
-#include "vl53l0x_api_core.h"
-#include "vl53l0x_api_calibration.h"
-#include "vl53l0x_api_strings.h"
-
-#ifndef __KERNEL__
-#include <stdlib.h>
-#endif
-#define LOG_FUNCTION_START(fmt, ...) \
- _LOG_FUNCTION_START(TRACE_MODULE_API, fmt, ##__VA_ARGS__)
-#define LOG_FUNCTION_END(status, ...) \
- _LOG_FUNCTION_END(TRACE_MODULE_API, status, ##__VA_ARGS__)
-#define LOG_FUNCTION_END_FMT(status, fmt, ...) \
- _LOG_FUNCTION_END_FMT(TRACE_MODULE_API, status, fmt, ##__VA_ARGS__)
-
-#ifdef VL53L0X_LOG_ENABLE
-#define trace_print(level, ...) trace_print_module_function(TRACE_MODULE_API, \
- level, TRACE_FUNCTION_NONE, ##__VA_ARGS__)
-#endif
-
-/* Group PAL General Functions */
-
-VL53L0X_Error VL53L0X_GetVersion(VL53L0X_Version_t *pVersion)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- pVersion->major = VL53L0X_IMPLEMENTATION_VER_MAJOR;
- pVersion->minor = VL53L0X_IMPLEMENTATION_VER_MINOR;
- pVersion->build = VL53L0X_IMPLEMENTATION_VER_SUB;
-
- pVersion->revision = VL53L0X_IMPLEMENTATION_VER_REVISION;
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetPalSpecVersion(VL53L0X_Version_t *pPalSpecVersion)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- LOG_FUNCTION_START("");
-
- pPalSpecVersion->major = VL53L0X_SPECIFICATION_VER_MAJOR;
- pPalSpecVersion->minor = VL53L0X_SPECIFICATION_VER_MINOR;
- pPalSpecVersion->build = VL53L0X_SPECIFICATION_VER_SUB;
-
- pPalSpecVersion->revision = VL53L0X_SPECIFICATION_VER_REVISION;
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetProductRevision(VL53L0X_DEV Dev,
- uint8_t *pProductRevisionMajor, uint8_t *pProductRevisionMinor)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t revision_id;
-
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_RdByte(Dev, VL53L0X_REG_IDENTIFICATION_REVISION_ID,
- &revision_id);
- *pProductRevisionMajor = 1;
- *pProductRevisionMinor = (revision_id & 0xF0) >> 4;
-
- LOG_FUNCTION_END(Status);
- return Status;
-
-}
-
-VL53L0X_Error VL53L0X_GetDeviceInfo(VL53L0X_DEV Dev,
- VL53L0X_DeviceInfo_t *pVL53L0X_DeviceInfo)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_get_device_info(Dev, pVL53L0X_DeviceInfo);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetDeviceErrorStatus(VL53L0X_DEV Dev,
- VL53L0X_DeviceError *pDeviceErrorStatus)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t RangeStatus;
-
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_RdByte(Dev, VL53L0X_REG_RESULT_RANGE_STATUS,
- &RangeStatus);
-
- *pDeviceErrorStatus = (VL53L0X_DeviceError)((RangeStatus & 0x78) >> 3);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-
-VL53L0X_Error VL53L0X_GetDeviceErrorString(VL53L0X_DeviceError ErrorCode,
- char *pDeviceErrorString)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_get_device_error_string(ErrorCode, pDeviceErrorString);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetRangeStatusString(uint8_t RangeStatus,
- char *pRangeStatusString)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_get_range_status_string(RangeStatus,
- pRangeStatusString);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetPalErrorString(VL53L0X_Error PalErrorCode,
- char *pPalErrorString)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_get_pal_error_string(PalErrorCode, pPalErrorString);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetPalStateString(VL53L0X_State PalStateCode,
- char *pPalStateString)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_get_pal_state_string(PalStateCode, pPalStateString);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetPalState(VL53L0X_DEV Dev, VL53L0X_State *pPalState)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- *pPalState = PALDevDataGet(Dev, PalState);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetPowerMode(VL53L0X_DEV Dev, VL53L0X_PowerModes PowerMode)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- /* Only level1 of Power mode exists */
- if ((PowerMode != VL53L0X_POWERMODE_STANDBY_LEVEL1)
- && (PowerMode != VL53L0X_POWERMODE_IDLE_LEVEL1)) {
- Status = VL53L0X_ERROR_MODE_NOT_SUPPORTED;
- } else if (PowerMode == VL53L0X_POWERMODE_STANDBY_LEVEL1) {
- /* set the standby level1 of power mode */
- Status = VL53L0X_WrByte(Dev, 0x80, 0x00);
- if (Status == VL53L0X_ERROR_NONE) {
- /* Set PAL State to standby */
- PALDevDataSet(Dev, PalState, VL53L0X_STATE_STANDBY);
- PALDevDataSet(Dev, PowerMode,
- VL53L0X_POWERMODE_STANDBY_LEVEL1);
- }
-
- } else {
- /* VL53L0X_POWERMODE_IDLE_LEVEL1 */
- Status = VL53L0X_WrByte(Dev, 0x80, 0x00);
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_StaticInit(Dev);
-
- if (Status == VL53L0X_ERROR_NONE)
- PALDevDataSet(Dev, PowerMode,
- VL53L0X_POWERMODE_IDLE_LEVEL1);
-
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetPowerMode(VL53L0X_DEV Dev, VL53L0X_PowerModes *pPowerMode)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t Byte;
- LOG_FUNCTION_START("");
-
- /* Only level1 of Power mode exists */
- Status = VL53L0X_RdByte(Dev, 0x80, &Byte);
-
- if (Status == VL53L0X_ERROR_NONE) {
- if (Byte == 1) {
- PALDevDataSet(Dev, PowerMode,
- VL53L0X_POWERMODE_IDLE_LEVEL1);
- } else {
- PALDevDataSet(Dev, PowerMode,
- VL53L0X_POWERMODE_STANDBY_LEVEL1);
- }
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetOffsetCalibrationDataMicroMeter(VL53L0X_DEV Dev,
- int32_t OffsetCalibrationDataMicroMeter)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_set_offset_calibration_data_micro_meter(Dev,
- OffsetCalibrationDataMicroMeter);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetOffsetCalibrationDataMicroMeter(VL53L0X_DEV Dev,
- int32_t *pOffsetCalibrationDataMicroMeter)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_get_offset_calibration_data_micro_meter(Dev,
- pOffsetCalibrationDataMicroMeter);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetLinearityCorrectiveGain(VL53L0X_DEV Dev,
- int16_t LinearityCorrectiveGain)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- if ((LinearityCorrectiveGain < 0) || (LinearityCorrectiveGain > 1000))
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- else {
- PALDevDataSet(Dev, LinearityCorrectiveGain,
- LinearityCorrectiveGain);
-
- if (LinearityCorrectiveGain != 1000) {
- /* Disable FW Xtalk */
- Status = VL53L0X_WrWord(Dev,
- VL53L0X_REG_CROSSTALK_COMPENSATION_PEAK_RATE_MCPS, 0);
- }
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetLinearityCorrectiveGain(VL53L0X_DEV Dev,
- uint16_t *pLinearityCorrectiveGain)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- *pLinearityCorrectiveGain = PALDevDataGet(Dev, LinearityCorrectiveGain);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetGroupParamHold(VL53L0X_DEV Dev, uint8_t GroupParamHold)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NOT_IMPLEMENTED;
- LOG_FUNCTION_START("");
-
- /* not implemented on VL53L0X */
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetUpperLimitMilliMeter(VL53L0X_DEV Dev,
- uint16_t *pUpperLimitMilliMeter)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NOT_IMPLEMENTED;
- LOG_FUNCTION_START("");
-
- /* not implemented on VL53L0X */
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetTotalSignalRate(VL53L0X_DEV Dev,
- FixPoint1616_t *pTotalSignalRate)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- VL53L0X_RangingMeasurementData_t LastRangeDataBuffer;
-
- LOG_FUNCTION_START("");
-
- LastRangeDataBuffer = PALDevDataGet(Dev, LastRangeMeasure);
-
- Status = VL53L0X_get_total_signal_rate(
- Dev, &LastRangeDataBuffer, pTotalSignalRate);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-/* End Group PAL General Functions */
-
-/* Group PAL Init Functions */
-VL53L0X_Error VL53L0X_SetDeviceAddress(VL53L0X_DEV Dev, uint8_t DeviceAddress)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_WrByte(Dev, VL53L0X_REG_I2C_SLAVE_DEVICE_ADDRESS,
- DeviceAddress / 2);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_DataInit(VL53L0X_DEV Dev)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- VL53L0X_DeviceParameters_t CurrentParameters;
- int i;
-
- LOG_FUNCTION_START("");
-
- /* by default the I2C is running at 1V8 if you want to change it you
- * need to include this define at compilation level. */
-#ifdef USE_I2C_2V8
- Status = VL53L0X_UpdateByte(Dev,
- VL53L0X_REG_VHV_CONFIG_PAD_SCL_SDA__EXTSUP_HV,
- 0xFE,
- 0x01);
-#endif
-
- /* Set I2C standard mode */
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_WrByte(Dev, 0x88, 0x00);
-
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev, ReadDataFromDeviceDone, 0);
-
-#ifdef USE_IQC_STATION
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_apply_offset_adjustment(Dev);
-#endif
-
- /* Default value is 1000 for Linearity Corrective Gain */
- PALDevDataSet(Dev, LinearityCorrectiveGain, 1000);
-
- /* Dmax default Parameter */
- PALDevDataSet(Dev, DmaxCalRangeMilliMeter, 400);
- PALDevDataSet(Dev, DmaxCalSignalRateRtnMegaCps,
- (FixPoint1616_t)((0x00016B85))); /* 1.42 No Cover Glass*/
-
- /* Set Default static parameters
- *set first temporary values 9.44MHz * 65536 = 618660 */
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev, OscFrequencyMHz, 618660);
-
- /* Set Default XTalkCompensationRateMegaCps to 0 */
- VL53L0X_SETPARAMETERFIELD(Dev, XTalkCompensationRateMegaCps, 0);
-
- /* Get default parameters */
- Status = VL53L0X_GetDeviceParameters(Dev, &CurrentParameters);
- if (Status == VL53L0X_ERROR_NONE) {
- /* initialize PAL values */
- CurrentParameters.DeviceMode = VL53L0X_DEVICEMODE_SINGLE_RANGING;
- CurrentParameters.HistogramMode = VL53L0X_HISTOGRAMMODE_DISABLED;
- PALDevDataSet(Dev, CurrentParameters, CurrentParameters);
- }
-
- /* Sigma estimator variable */
- PALDevDataSet(Dev, SigmaEstRefArray, 100);
- PALDevDataSet(Dev, SigmaEstEffPulseWidth, 900);
- PALDevDataSet(Dev, SigmaEstEffAmbWidth, 500);
- PALDevDataSet(Dev, targetRefRate, 0x0A00); /* 20 MCPS in 9:7 format */
-
- /* Use internal default settings */
- PALDevDataSet(Dev, UseInternalTuningSettings, 1);
-
- /* Enable all check */
- for (i = 0; i < VL53L0X_CHECKENABLE_NUMBER_OF_CHECKS; i++) {
- if (Status == VL53L0X_ERROR_NONE)
- Status |= VL53L0X_SetLimitCheckEnable(Dev, i, 1);
- else
- break;
-
- }
-
- /* Disable the following checks */
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_SetLimitCheckEnable(Dev,
- VL53L0X_CHECKENABLE_SIGNAL_REF_CLIP, 0);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_SetLimitCheckEnable(Dev,
- VL53L0X_CHECKENABLE_RANGE_IGNORE_THRESHOLD, 0);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_SetLimitCheckEnable(Dev,
- VL53L0X_CHECKENABLE_SIGNAL_RATE_MSRC, 0);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_SetLimitCheckEnable(Dev,
- VL53L0X_CHECKENABLE_SIGNAL_RATE_PRE_RANGE, 0);
-
- /* Limit default values */
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_SetLimitCheckValue(Dev,
- VL53L0X_CHECKENABLE_SIGMA_FINAL_RANGE,
- (FixPoint1616_t)(18 * 65536));
- }
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_SetLimitCheckValue(Dev,
- VL53L0X_CHECKENABLE_SIGNAL_RATE_FINAL_RANGE,
- (FixPoint1616_t)(25 * 65536 / 100));
- /* 0.25 * 65536 */
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_SetLimitCheckValue(Dev,
- VL53L0X_CHECKENABLE_SIGNAL_REF_CLIP,
- (FixPoint1616_t)(35 * 65536));
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_SetLimitCheckValue(Dev,
- VL53L0X_CHECKENABLE_RANGE_IGNORE_THRESHOLD,
- (FixPoint1616_t)(0 * 65536));
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
-
- PALDevDataSet(Dev, SequenceConfig, 0xFF);
- Status = VL53L0X_WrByte(Dev, VL53L0X_REG_SYSTEM_SEQUENCE_CONFIG,
- 0xFF);
-
- /* Set PAL state to tell that we are waiting for call to
- * VL53L0X_StaticInit */
- PALDevDataSet(Dev, PalState, VL53L0X_STATE_WAIT_STATICINIT);
- }
-
- if (Status == VL53L0X_ERROR_NONE)
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev, RefSpadsInitialised, 0);
-
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetTuningSettingBuffer(VL53L0X_DEV Dev,
- uint8_t *pTuningSettingBuffer, uint8_t UseInternalTuningSettings)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- LOG_FUNCTION_START("");
-
- if (UseInternalTuningSettings == 1) {
- /* Force use internal settings */
- PALDevDataSet(Dev, UseInternalTuningSettings, 1);
- } else {
-
- /* check that the first byte is not 0 */
- if (*pTuningSettingBuffer != 0) {
- PALDevDataSet(Dev, pTuningSettingsPointer,
- pTuningSettingBuffer);
- PALDevDataSet(Dev, UseInternalTuningSettings, 0);
-
- } else {
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- }
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetTuningSettingBuffer(VL53L0X_DEV Dev,
- uint8_t **ppTuningSettingBuffer, uint8_t *pUseInternalTuningSettings)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- LOG_FUNCTION_START("");
-
- *ppTuningSettingBuffer = PALDevDataGet(Dev, pTuningSettingsPointer);
- *pUseInternalTuningSettings = PALDevDataGet(Dev,
- UseInternalTuningSettings);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_StaticInit(VL53L0X_DEV Dev)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- VL53L0X_DeviceParameters_t CurrentParameters = {0};
- uint8_t *pTuningSettingBuffer;
- uint16_t tempword = 0;
- uint8_t tempbyte = 0;
- uint8_t UseInternalTuningSettings = 0;
- uint32_t count = 0;
- uint8_t isApertureSpads = 0;
- uint32_t refSpadCount = 0;
- uint8_t ApertureSpads = 0;
- uint8_t vcselPulsePeriodPCLK;
- FixPoint1616_t seqTimeoutMilliSecs;
-
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_get_info_from_device(Dev, 1);
-
- /* set the ref spad from NVM */
- count = (uint32_t)VL53L0X_GETDEVICESPECIFICPARAMETER(Dev,
- ReferenceSpadCount);
- ApertureSpads = VL53L0X_GETDEVICESPECIFICPARAMETER(Dev,
- ReferenceSpadType);
-
- /* NVM value invalid */
- if ((ApertureSpads > 1) ||
- ((ApertureSpads == 1) && (count > 32)) ||
- ((ApertureSpads == 0) && (count > 12)))
- Status = VL53L0X_perform_ref_spad_management(Dev, &refSpadCount,
- &isApertureSpads);
- else
- Status = VL53L0X_set_reference_spads(Dev, count, ApertureSpads);
-
-
- /* Initialize tuning settings buffer to prevent compiler warning. */
- pTuningSettingBuffer = DefaultTuningSettings;
-
- if (Status == VL53L0X_ERROR_NONE) {
- UseInternalTuningSettings = PALDevDataGet(Dev,
- UseInternalTuningSettings);
-
- if (UseInternalTuningSettings == 0)
- pTuningSettingBuffer = PALDevDataGet(Dev,
- pTuningSettingsPointer);
- else
- pTuningSettingBuffer = DefaultTuningSettings;
-
- }
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_load_tuning_settings(Dev, pTuningSettingBuffer);
-
-
- /* Set interrupt config to new sample ready */
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_SetGpioConfig(Dev, 0, 0,
- VL53L0X_REG_SYSTEM_INTERRUPT_GPIO_NEW_SAMPLE_READY,
- VL53L0X_INTERRUPTPOLARITY_LOW);
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_WrByte(Dev, 0xFF, 0x01);
- Status |= VL53L0X_RdWord(Dev, 0x84, &tempword);
- Status |= VL53L0X_WrByte(Dev, 0xFF, 0x00);
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev, OscFrequencyMHz,
- VL53L0X_FIXPOINT412TOFIXPOINT1616(tempword));
- }
-
- /* After static init, some device parameters may be changed,
- * so update them */
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_GetDeviceParameters(Dev, &CurrentParameters);
-
-
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_GetFractionEnable(Dev, &tempbyte);
- if (Status == VL53L0X_ERROR_NONE)
- PALDevDataSet(Dev, RangeFractionalEnable, tempbyte);
-
- }
-
- if (Status == VL53L0X_ERROR_NONE)
- PALDevDataSet(Dev, CurrentParameters, CurrentParameters);
-
-
- /* read the sequence config and save it */
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_RdByte(Dev,
- VL53L0X_REG_SYSTEM_SEQUENCE_CONFIG, &tempbyte);
- if (Status == VL53L0X_ERROR_NONE)
- PALDevDataSet(Dev, SequenceConfig, tempbyte);
-
- }
-
- /* Disable MSRC and TCC by default */
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_SetSequenceStepEnable(Dev,
- VL53L0X_SEQUENCESTEP_TCC, 0);
-
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_SetSequenceStepEnable(Dev,
- VL53L0X_SEQUENCESTEP_MSRC, 0);
-
-
- /* Set PAL State to standby */
- if (Status == VL53L0X_ERROR_NONE)
- PALDevDataSet(Dev, PalState, VL53L0X_STATE_IDLE);
-
-
-
- /* Store pre-range vcsel period */
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_GetVcselPulsePeriod(
- Dev,
- VL53L0X_VCSEL_PERIOD_PRE_RANGE,
- &vcselPulsePeriodPCLK);
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- VL53L0X_SETDEVICESPECIFICPARAMETER(
- Dev,
- PreRangeVcselPulsePeriod,
- vcselPulsePeriodPCLK);
- }
-
- /* Store final-range vcsel period */
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_GetVcselPulsePeriod(
- Dev,
- VL53L0X_VCSEL_PERIOD_FINAL_RANGE,
- &vcselPulsePeriodPCLK);
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- VL53L0X_SETDEVICESPECIFICPARAMETER(
- Dev,
- FinalRangeVcselPulsePeriod,
- vcselPulsePeriodPCLK);
- }
-
- /* Store pre-range timeout */
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_GetSequenceStepTimeout(
- Dev,
- VL53L0X_SEQUENCESTEP_PRE_RANGE,
- &seqTimeoutMilliSecs);
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- VL53L0X_SETDEVICESPECIFICPARAMETER(
- Dev,
- PreRangeTimeoutMicroSecs,
- seqTimeoutMilliSecs);
- }
-
- /* Store final-range timeout */
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_GetSequenceStepTimeout(
- Dev,
- VL53L0X_SEQUENCESTEP_FINAL_RANGE,
- &seqTimeoutMilliSecs);
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- VL53L0X_SETDEVICESPECIFICPARAMETER(
- Dev,
- FinalRangeTimeoutMicroSecs,
- seqTimeoutMilliSecs);
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_WaitDeviceBooted(VL53L0X_DEV Dev)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NOT_IMPLEMENTED;
- LOG_FUNCTION_START("");
-
- /* not implemented on VL53L0X */
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_ResetDevice(VL53L0X_DEV Dev)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t Byte;
- LOG_FUNCTION_START("");
-
- /* Set reset bit */
- Status = VL53L0X_WrByte(Dev, VL53L0X_REG_SOFT_RESET_GO2_SOFT_RESET_N,
- 0x00);
-
- /* Wait for some time */
- if (Status == VL53L0X_ERROR_NONE) {
- do {
- Status = VL53L0X_RdByte(Dev,
- VL53L0X_REG_IDENTIFICATION_MODEL_ID, &Byte);
- } while (Byte != 0x00);
- }
-
- /* Release reset */
- Status = VL53L0X_WrByte(Dev, VL53L0X_REG_SOFT_RESET_GO2_SOFT_RESET_N,
- 0x01);
-
- /* Wait until correct boot-up of the device */
- if (Status == VL53L0X_ERROR_NONE) {
- do {
- Status = VL53L0X_RdByte(Dev,
- VL53L0X_REG_IDENTIFICATION_MODEL_ID, &Byte);
- } while (Byte == 0x00);
- }
-
- /* Set PAL State to VL53L0X_STATE_POWERDOWN */
- if (Status == VL53L0X_ERROR_NONE)
- PALDevDataSet(Dev, PalState, VL53L0X_STATE_POWERDOWN);
-
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-/* End Group PAL Init Functions */
-
-/* Group PAL Parameters Functions */
-VL53L0X_Error VL53L0X_SetDeviceParameters(VL53L0X_DEV Dev,
- const VL53L0X_DeviceParameters_t *pDeviceParameters)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- int i;
- LOG_FUNCTION_START("");
- Status = VL53L0X_SetDeviceMode(Dev, pDeviceParameters->DeviceMode);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_SetInterMeasurementPeriodMilliSeconds(Dev,
- pDeviceParameters->InterMeasurementPeriodMilliSeconds);
-
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_SetXTalkCompensationRateMegaCps(Dev,
- pDeviceParameters->XTalkCompensationRateMegaCps);
-
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_SetOffsetCalibrationDataMicroMeter(Dev,
- pDeviceParameters->RangeOffsetMicroMeters);
-
-
- for (i = 0; i < VL53L0X_CHECKENABLE_NUMBER_OF_CHECKS; i++) {
- if (Status == VL53L0X_ERROR_NONE)
- Status |= VL53L0X_SetLimitCheckEnable(Dev, i,
- pDeviceParameters->LimitChecksEnable[i]);
- else
- break;
-
- if (Status == VL53L0X_ERROR_NONE)
- Status |= VL53L0X_SetLimitCheckValue(Dev, i,
- pDeviceParameters->LimitChecksValue[i]);
- else
- break;
-
- }
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_SetWrapAroundCheckEnable(Dev,
- pDeviceParameters->WrapAroundCheckEnable);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_SetMeasurementTimingBudgetMicroSeconds(Dev,
- pDeviceParameters->MeasurementTimingBudgetMicroSeconds);
-
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetDeviceParameters(VL53L0X_DEV Dev,
- VL53L0X_DeviceParameters_t *pDeviceParameters)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- int i;
-
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_GetDeviceMode(Dev, &(pDeviceParameters->DeviceMode));
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_GetInterMeasurementPeriodMilliSeconds(Dev,
- &(pDeviceParameters->InterMeasurementPeriodMilliSeconds));
-
-
- if (Status == VL53L0X_ERROR_NONE)
- pDeviceParameters->XTalkCompensationEnable = 0;
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_GetXTalkCompensationRateMegaCps(Dev,
- &(pDeviceParameters->XTalkCompensationRateMegaCps));
-
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_GetOffsetCalibrationDataMicroMeter(Dev,
- &(pDeviceParameters->RangeOffsetMicroMeters));
-
-
- if (Status == VL53L0X_ERROR_NONE) {
- for (i = 0; i < VL53L0X_CHECKENABLE_NUMBER_OF_CHECKS; i++) {
- /* get first the values, then the enables.
- * VL53L0X_GetLimitCheckValue will modify the enable
- * flags
- */
- if (Status == VL53L0X_ERROR_NONE) {
- Status |= VL53L0X_GetLimitCheckValue(Dev, i,
- &(pDeviceParameters->LimitChecksValue[i]));
- } else {
- break;
- }
- if (Status == VL53L0X_ERROR_NONE) {
- Status |= VL53L0X_GetLimitCheckEnable(Dev, i,
- &(pDeviceParameters->LimitChecksEnable[i]));
- } else {
- break;
- }
- }
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_GetWrapAroundCheckEnable(Dev,
- &(pDeviceParameters->WrapAroundCheckEnable));
- }
-
- /* Need to be done at the end as it uses VCSELPulsePeriod */
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_GetMeasurementTimingBudgetMicroSeconds(Dev,
- &(pDeviceParameters->MeasurementTimingBudgetMicroSeconds));
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetDeviceMode(VL53L0X_DEV Dev, VL53L0X_DeviceModes DeviceMode)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- LOG_FUNCTION_START("%d", (int)DeviceMode);
-
- switch (DeviceMode) {
- case VL53L0X_DEVICEMODE_SINGLE_RANGING:
- case VL53L0X_DEVICEMODE_CONTINUOUS_RANGING:
- case VL53L0X_DEVICEMODE_CONTINUOUS_TIMED_RANGING:
- case VL53L0X_DEVICEMODE_GPIO_DRIVE:
- case VL53L0X_DEVICEMODE_GPIO_OSC:
- /* Supported modes */
- VL53L0X_SETPARAMETERFIELD(Dev, DeviceMode, DeviceMode);
- break;
- default:
- /* Unsupported mode */
- Status = VL53L0X_ERROR_MODE_NOT_SUPPORTED;
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetDeviceMode(VL53L0X_DEV Dev,
- VL53L0X_DeviceModes *pDeviceMode)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- VL53L0X_GETPARAMETERFIELD(Dev, DeviceMode, *pDeviceMode);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetRangeFractionEnable(VL53L0X_DEV Dev, uint8_t Enable)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- LOG_FUNCTION_START("%d", (int)Enable);
-
- Status = VL53L0X_WrByte(Dev, VL53L0X_REG_SYSTEM_RANGE_CONFIG, Enable);
-
- if (Status == VL53L0X_ERROR_NONE)
- PALDevDataSet(Dev, RangeFractionalEnable, Enable);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetFractionEnable(VL53L0X_DEV Dev, uint8_t *pEnabled)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_RdByte(Dev, VL53L0X_REG_SYSTEM_RANGE_CONFIG, pEnabled);
-
- if (Status == VL53L0X_ERROR_NONE)
- *pEnabled = (*pEnabled & 1);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetHistogramMode(VL53L0X_DEV Dev,
- VL53L0X_HistogramModes HistogramMode)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NOT_IMPLEMENTED;
- LOG_FUNCTION_START("");
-
- /* not implemented on VL53L0X */
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetHistogramMode(VL53L0X_DEV Dev,
- VL53L0X_HistogramModes *pHistogramMode)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NOT_IMPLEMENTED;
- LOG_FUNCTION_START("");
-
- /* not implemented on VL53L0X */
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetMeasurementTimingBudgetMicroSeconds(VL53L0X_DEV Dev,
- uint32_t MeasurementTimingBudgetMicroSeconds)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_set_measurement_timing_budget_micro_seconds(Dev,
- MeasurementTimingBudgetMicroSeconds);
-
- LOG_FUNCTION_END(Status);
-
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetMeasurementTimingBudgetMicroSeconds(VL53L0X_DEV Dev,
- uint32_t *pMeasurementTimingBudgetMicroSeconds)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_get_measurement_timing_budget_micro_seconds(Dev,
- pMeasurementTimingBudgetMicroSeconds);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetVcselPulsePeriod(VL53L0X_DEV Dev,
- VL53L0X_VcselPeriod VcselPeriodType, uint8_t VCSELPulsePeriodPCLK)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_set_vcsel_pulse_period(Dev, VcselPeriodType,
- VCSELPulsePeriodPCLK);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetVcselPulsePeriod(VL53L0X_DEV Dev,
- VL53L0X_VcselPeriod VcselPeriodType, uint8_t *pVCSELPulsePeriodPCLK)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_get_vcsel_pulse_period(Dev, VcselPeriodType,
- pVCSELPulsePeriodPCLK);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetSequenceStepEnable(VL53L0X_DEV Dev,
- VL53L0X_SequenceStepId SequenceStepId, uint8_t SequenceStepEnabled)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t SequenceConfig = 0;
- uint8_t SequenceConfigNew = 0;
- uint32_t MeasurementTimingBudgetMicroSeconds;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_RdByte(Dev, VL53L0X_REG_SYSTEM_SEQUENCE_CONFIG,
- &SequenceConfig);
-
- SequenceConfigNew = SequenceConfig;
-
- if (Status == VL53L0X_ERROR_NONE) {
- if (SequenceStepEnabled == 1) {
-
- /* Enable requested sequence step
- */
- switch (SequenceStepId) {
- case VL53L0X_SEQUENCESTEP_TCC:
- SequenceConfigNew |= 0x10;
- break;
- case VL53L0X_SEQUENCESTEP_DSS:
- SequenceConfigNew |= 0x28;
- break;
- case VL53L0X_SEQUENCESTEP_MSRC:
- SequenceConfigNew |= 0x04;
- break;
- case VL53L0X_SEQUENCESTEP_PRE_RANGE:
- SequenceConfigNew |= 0x40;
- break;
- case VL53L0X_SEQUENCESTEP_FINAL_RANGE:
- SequenceConfigNew |= 0x80;
- break;
- default:
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- }
- } else {
- /* Disable requested sequence step
- */
- switch (SequenceStepId) {
- case VL53L0X_SEQUENCESTEP_TCC:
- SequenceConfigNew &= 0xef;
- break;
- case VL53L0X_SEQUENCESTEP_DSS:
- SequenceConfigNew &= 0xd7;
- break;
- case VL53L0X_SEQUENCESTEP_MSRC:
- SequenceConfigNew &= 0xfb;
- break;
- case VL53L0X_SEQUENCESTEP_PRE_RANGE:
- SequenceConfigNew &= 0xbf;
- break;
- case VL53L0X_SEQUENCESTEP_FINAL_RANGE:
- SequenceConfigNew &= 0x7f;
- break;
- default:
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- }
- }
- }
-
- if (SequenceConfigNew != SequenceConfig) {
- /* Apply New Setting */
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_SYSTEM_SEQUENCE_CONFIG, SequenceConfigNew);
- }
- if (Status == VL53L0X_ERROR_NONE)
- PALDevDataSet(Dev, SequenceConfig, SequenceConfigNew);
-
-
- /* Recalculate timing budget */
- if (Status == VL53L0X_ERROR_NONE) {
- VL53L0X_GETPARAMETERFIELD(Dev,
- MeasurementTimingBudgetMicroSeconds,
- MeasurementTimingBudgetMicroSeconds);
-
- VL53L0X_SetMeasurementTimingBudgetMicroSeconds(Dev,
- MeasurementTimingBudgetMicroSeconds);
- }
- }
-
- LOG_FUNCTION_END(Status);
-
- return Status;
-}
-
-VL53L0X_Error sequence_step_enabled(VL53L0X_DEV Dev,
- VL53L0X_SequenceStepId SequenceStepId, uint8_t SequenceConfig,
- uint8_t *pSequenceStepEnabled)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- *pSequenceStepEnabled = 0;
- LOG_FUNCTION_START("");
-
- switch (SequenceStepId) {
- case VL53L0X_SEQUENCESTEP_TCC:
- *pSequenceStepEnabled = (SequenceConfig & 0x10) >> 4;
- break;
- case VL53L0X_SEQUENCESTEP_DSS:
- *pSequenceStepEnabled = (SequenceConfig & 0x08) >> 3;
- break;
- case VL53L0X_SEQUENCESTEP_MSRC:
- *pSequenceStepEnabled = (SequenceConfig & 0x04) >> 2;
- break;
- case VL53L0X_SEQUENCESTEP_PRE_RANGE:
- *pSequenceStepEnabled = (SequenceConfig & 0x40) >> 6;
- break;
- case VL53L0X_SEQUENCESTEP_FINAL_RANGE:
- *pSequenceStepEnabled = (SequenceConfig & 0x80) >> 7;
- break;
- default:
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetSequenceStepEnable(VL53L0X_DEV Dev,
- VL53L0X_SequenceStepId SequenceStepId, uint8_t *pSequenceStepEnabled)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t SequenceConfig = 0;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_RdByte(Dev, VL53L0X_REG_SYSTEM_SEQUENCE_CONFIG,
- &SequenceConfig);
-
- if (Status == VL53L0X_ERROR_NONE) {
- Status = sequence_step_enabled(Dev, SequenceStepId,
- SequenceConfig, pSequenceStepEnabled);
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetSequenceStepEnables(VL53L0X_DEV Dev,
- VL53L0X_SchedulerSequenceSteps_t *pSchedulerSequenceSteps)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t SequenceConfig = 0;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_RdByte(Dev, VL53L0X_REG_SYSTEM_SEQUENCE_CONFIG,
- &SequenceConfig);
-
- if (Status == VL53L0X_ERROR_NONE) {
- Status = sequence_step_enabled(Dev,
- VL53L0X_SEQUENCESTEP_TCC, SequenceConfig,
- &pSchedulerSequenceSteps->TccOn);
- }
- if (Status == VL53L0X_ERROR_NONE) {
- Status = sequence_step_enabled(Dev,
- VL53L0X_SEQUENCESTEP_DSS, SequenceConfig,
- &pSchedulerSequenceSteps->DssOn);
- }
- if (Status == VL53L0X_ERROR_NONE) {
- Status = sequence_step_enabled(Dev,
- VL53L0X_SEQUENCESTEP_MSRC, SequenceConfig,
- &pSchedulerSequenceSteps->MsrcOn);
- }
- if (Status == VL53L0X_ERROR_NONE) {
- Status = sequence_step_enabled(Dev,
- VL53L0X_SEQUENCESTEP_PRE_RANGE, SequenceConfig,
- &pSchedulerSequenceSteps->PreRangeOn);
- }
- if (Status == VL53L0X_ERROR_NONE) {
- Status = sequence_step_enabled(Dev,
- VL53L0X_SEQUENCESTEP_FINAL_RANGE, SequenceConfig,
- &pSchedulerSequenceSteps->FinalRangeOn);
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetNumberOfSequenceSteps(VL53L0X_DEV Dev,
- uint8_t *pNumberOfSequenceSteps)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- *pNumberOfSequenceSteps = VL53L0X_SEQUENCESTEP_NUMBER_OF_CHECKS;
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetSequenceStepsInfo(VL53L0X_SequenceStepId SequenceStepId,
- char *pSequenceStepsString)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_get_sequence_steps_info(
- SequenceStepId,
- pSequenceStepsString);
-
- LOG_FUNCTION_END(Status);
-
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetSequenceStepTimeout(VL53L0X_DEV Dev,
- VL53L0X_SequenceStepId SequenceStepId, FixPoint1616_t TimeOutMilliSecs)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- VL53L0X_Error Status1 = VL53L0X_ERROR_NONE;
- uint32_t TimeoutMicroSeconds = ((TimeOutMilliSecs * 1000) + 0x8000)
- >> 16;
- uint32_t MeasurementTimingBudgetMicroSeconds;
- FixPoint1616_t OldTimeOutMicroSeconds;
-
- LOG_FUNCTION_START("");
-
- /* Read back the current value in case we need to revert back to this.
- */
- Status = get_sequence_step_timeout(Dev, SequenceStepId,
- &OldTimeOutMicroSeconds);
-
- if (Status == VL53L0X_ERROR_NONE) {
- Status = set_sequence_step_timeout(Dev, SequenceStepId,
- TimeoutMicroSeconds);
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- VL53L0X_GETPARAMETERFIELD(Dev,
- MeasurementTimingBudgetMicroSeconds,
- MeasurementTimingBudgetMicroSeconds);
-
- /* At this point we don't know if the requested value is valid,
- therefore proceed to update the entire timing budget and
- if this fails, revert back to the previous value.
- */
- Status = VL53L0X_SetMeasurementTimingBudgetMicroSeconds(Dev,
- MeasurementTimingBudgetMicroSeconds);
-
- if (Status != VL53L0X_ERROR_NONE) {
- Status1 = set_sequence_step_timeout(Dev, SequenceStepId,
- OldTimeOutMicroSeconds);
-
- if (Status1 == VL53L0X_ERROR_NONE) {
- Status1 =
- VL53L0X_SetMeasurementTimingBudgetMicroSeconds(
- Dev,
- MeasurementTimingBudgetMicroSeconds);
- }
-
- Status = Status1;
- }
- }
-
- LOG_FUNCTION_END(Status);
-
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetSequenceStepTimeout(VL53L0X_DEV Dev,
- VL53L0X_SequenceStepId SequenceStepId, FixPoint1616_t *pTimeOutMilliSecs)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint32_t TimeoutMicroSeconds;
- uint32_t WholeNumber_ms = 0;
- uint32_t Fraction_ms = 0;
- LOG_FUNCTION_START("");
-
- Status = get_sequence_step_timeout(Dev, SequenceStepId,
- &TimeoutMicroSeconds);
- if (Status == VL53L0X_ERROR_NONE) {
- WholeNumber_ms = TimeoutMicroSeconds / 1000;
- Fraction_ms = TimeoutMicroSeconds - (WholeNumber_ms * 1000);
- *pTimeOutMilliSecs = (WholeNumber_ms << 16)
- + (((Fraction_ms * 0xffff) + 500) / 1000);
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetInterMeasurementPeriodMilliSeconds(VL53L0X_DEV Dev,
- uint32_t InterMeasurementPeriodMilliSeconds)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint16_t osc_calibrate_val;
- uint32_t IMPeriodMilliSeconds;
-
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_RdWord(Dev, VL53L0X_REG_OSC_CALIBRATE_VAL,
- &osc_calibrate_val);
-
- if (Status == VL53L0X_ERROR_NONE) {
- if (osc_calibrate_val != 0) {
- IMPeriodMilliSeconds =
- InterMeasurementPeriodMilliSeconds
- * osc_calibrate_val;
- } else {
- IMPeriodMilliSeconds =
- InterMeasurementPeriodMilliSeconds;
- }
- Status = VL53L0X_WrDWord(Dev,
- VL53L0X_REG_SYSTEM_INTERMEASUREMENT_PERIOD,
- IMPeriodMilliSeconds);
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- VL53L0X_SETPARAMETERFIELD(Dev,
- InterMeasurementPeriodMilliSeconds,
- InterMeasurementPeriodMilliSeconds);
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetInterMeasurementPeriodMilliSeconds(VL53L0X_DEV Dev,
- uint32_t *pInterMeasurementPeriodMilliSeconds)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint16_t osc_calibrate_val;
- uint32_t IMPeriodMilliSeconds;
-
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_RdWord(Dev, VL53L0X_REG_OSC_CALIBRATE_VAL,
- &osc_calibrate_val);
-
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_RdDWord(Dev,
- VL53L0X_REG_SYSTEM_INTERMEASUREMENT_PERIOD,
- &IMPeriodMilliSeconds);
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- if (osc_calibrate_val != 0) {
- *pInterMeasurementPeriodMilliSeconds =
- IMPeriodMilliSeconds / osc_calibrate_val;
- }
- VL53L0X_SETPARAMETERFIELD(Dev,
- InterMeasurementPeriodMilliSeconds,
- *pInterMeasurementPeriodMilliSeconds);
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetXTalkCompensationEnable(VL53L0X_DEV Dev,
- uint8_t XTalkCompensationEnable)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- FixPoint1616_t TempFix1616;
- uint16_t LinearityCorrectiveGain;
-
- LOG_FUNCTION_START("");
-
- LinearityCorrectiveGain = PALDevDataGet(Dev, LinearityCorrectiveGain);
-
- if ((XTalkCompensationEnable == 0)
- || (LinearityCorrectiveGain != 1000)) {
- TempFix1616 = 0;
- } else {
- VL53L0X_GETPARAMETERFIELD(Dev, XTalkCompensationRateMegaCps,
- TempFix1616);
- }
-
- /* the following register has a format 3.13 */
- Status = VL53L0X_WrWord(Dev,
- VL53L0X_REG_CROSSTALK_COMPENSATION_PEAK_RATE_MCPS,
- VL53L0X_FIXPOINT1616TOFIXPOINT313(TempFix1616));
-
- if (Status == VL53L0X_ERROR_NONE) {
- if (XTalkCompensationEnable == 0) {
- VL53L0X_SETPARAMETERFIELD(Dev, XTalkCompensationEnable,
- 0);
- } else {
- VL53L0X_SETPARAMETERFIELD(Dev, XTalkCompensationEnable,
- 1);
- }
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetXTalkCompensationEnable(VL53L0X_DEV Dev,
- uint8_t *pXTalkCompensationEnable)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t Temp8;
- LOG_FUNCTION_START("");
-
- VL53L0X_GETPARAMETERFIELD(Dev, XTalkCompensationEnable, Temp8);
- *pXTalkCompensationEnable = Temp8;
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetXTalkCompensationRateMegaCps(VL53L0X_DEV Dev,
- FixPoint1616_t XTalkCompensationRateMegaCps)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t Temp8;
- uint16_t LinearityCorrectiveGain;
- uint16_t data;
- LOG_FUNCTION_START("");
-
- VL53L0X_GETPARAMETERFIELD(Dev, XTalkCompensationEnable, Temp8);
- LinearityCorrectiveGain = PALDevDataGet(Dev, LinearityCorrectiveGain);
-
- if (Temp8 == 0) { /* disabled write only internal value */
- VL53L0X_SETPARAMETERFIELD(Dev, XTalkCompensationRateMegaCps,
- XTalkCompensationRateMegaCps);
- } else {
- /* the following register has a format 3.13 */
- if (LinearityCorrectiveGain == 1000) {
- data = VL53L0X_FIXPOINT1616TOFIXPOINT313(
- XTalkCompensationRateMegaCps);
- } else {
- data = 0;
- }
-
- Status = VL53L0X_WrWord(Dev,
- VL53L0X_REG_CROSSTALK_COMPENSATION_PEAK_RATE_MCPS, data);
-
- if (Status == VL53L0X_ERROR_NONE) {
- VL53L0X_SETPARAMETERFIELD(Dev,
- XTalkCompensationRateMegaCps,
- XTalkCompensationRateMegaCps);
- }
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetXTalkCompensationRateMegaCps(VL53L0X_DEV Dev,
- FixPoint1616_t *pXTalkCompensationRateMegaCps)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint16_t Value;
- FixPoint1616_t TempFix1616;
-
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_RdWord(Dev,
- VL53L0X_REG_CROSSTALK_COMPENSATION_PEAK_RATE_MCPS, (uint16_t *)&Value);
- if (Status == VL53L0X_ERROR_NONE) {
- if (Value == 0) {
- /* the Xtalk is disabled return value from memory */
- VL53L0X_GETPARAMETERFIELD(Dev,
- XTalkCompensationRateMegaCps, TempFix1616);
- *pXTalkCompensationRateMegaCps = TempFix1616;
- VL53L0X_SETPARAMETERFIELD(Dev, XTalkCompensationEnable,
- 0);
- } else {
- TempFix1616 = VL53L0X_FIXPOINT313TOFIXPOINT1616(Value);
- *pXTalkCompensationRateMegaCps = TempFix1616;
- VL53L0X_SETPARAMETERFIELD(Dev,
- XTalkCompensationRateMegaCps, TempFix1616);
- VL53L0X_SETPARAMETERFIELD(Dev, XTalkCompensationEnable,
- 1);
- }
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetRefCalibration(VL53L0X_DEV Dev, uint8_t VhvSettings,
- uint8_t PhaseCal)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_set_ref_calibration(Dev, VhvSettings, PhaseCal);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetRefCalibration(VL53L0X_DEV Dev, uint8_t *pVhvSettings,
- uint8_t *pPhaseCal)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_get_ref_calibration(Dev, pVhvSettings, pPhaseCal);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-/*
- * CHECK LIMIT FUNCTIONS
- */
-
-VL53L0X_Error VL53L0X_GetNumberOfLimitCheck(uint16_t *pNumberOfLimitCheck)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- *pNumberOfLimitCheck = VL53L0X_CHECKENABLE_NUMBER_OF_CHECKS;
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetLimitCheckInfo(VL53L0X_DEV Dev, uint16_t LimitCheckId,
- char *pLimitCheckString)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_get_limit_check_info(Dev, LimitCheckId,
- pLimitCheckString);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetLimitCheckStatus(VL53L0X_DEV Dev, uint16_t LimitCheckId,
- uint8_t *pLimitCheckStatus)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t Temp8;
-
- LOG_FUNCTION_START("");
-
- if (LimitCheckId >= VL53L0X_CHECKENABLE_NUMBER_OF_CHECKS) {
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- } else {
-
- VL53L0X_GETARRAYPARAMETERFIELD(Dev, LimitChecksStatus,
- LimitCheckId, Temp8);
-
- *pLimitCheckStatus = Temp8;
-
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetLimitCheckEnable(VL53L0X_DEV Dev, uint16_t LimitCheckId,
- uint8_t LimitCheckEnable)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- FixPoint1616_t TempFix1616 = 0;
- uint8_t LimitCheckEnableInt = 0;
- uint8_t LimitCheckDisable = 0;
- uint8_t Temp8;
-
- LOG_FUNCTION_START("");
-
- if (LimitCheckId >= VL53L0X_CHECKENABLE_NUMBER_OF_CHECKS) {
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- } else {
- if (LimitCheckEnable == 0) {
- TempFix1616 = 0;
- LimitCheckEnableInt = 0;
- LimitCheckDisable = 1;
-
- } else {
- VL53L0X_GETARRAYPARAMETERFIELD(Dev, LimitChecksValue,
- LimitCheckId, TempFix1616);
- LimitCheckDisable = 0;
- /* this to be sure to have either 0 or 1 */
- LimitCheckEnableInt = 1;
- }
-
- switch (LimitCheckId) {
-
- case VL53L0X_CHECKENABLE_SIGMA_FINAL_RANGE:
- /* internal computation: */
- VL53L0X_SETARRAYPARAMETERFIELD(Dev, LimitChecksEnable,
- VL53L0X_CHECKENABLE_SIGMA_FINAL_RANGE,
- LimitCheckEnableInt);
-
- break;
-
- case VL53L0X_CHECKENABLE_SIGNAL_RATE_FINAL_RANGE:
-
- Status = VL53L0X_WrWord(Dev,
- VL53L0X_REG_FINAL_RANGE_CONFIG_MIN_COUNT_RATE_RTN_LIMIT,
- VL53L0X_FIXPOINT1616TOFIXPOINT97(TempFix1616));
-
- break;
-
- case VL53L0X_CHECKENABLE_SIGNAL_REF_CLIP:
-
- /* internal computation: */
- VL53L0X_SETARRAYPARAMETERFIELD(Dev, LimitChecksEnable,
- VL53L0X_CHECKENABLE_SIGNAL_REF_CLIP,
- LimitCheckEnableInt);
-
- break;
-
- case VL53L0X_CHECKENABLE_RANGE_IGNORE_THRESHOLD:
-
- /* internal computation: */
- VL53L0X_SETARRAYPARAMETERFIELD(Dev, LimitChecksEnable,
- VL53L0X_CHECKENABLE_RANGE_IGNORE_THRESHOLD,
- LimitCheckEnableInt);
-
- break;
-
- case VL53L0X_CHECKENABLE_SIGNAL_RATE_MSRC:
-
- Temp8 = (uint8_t)(LimitCheckDisable << 1);
- Status = VL53L0X_UpdateByte(Dev,
- VL53L0X_REG_MSRC_CONFIG_CONTROL,
- 0xFE, Temp8);
-
- break;
-
- case VL53L0X_CHECKENABLE_SIGNAL_RATE_PRE_RANGE:
-
- Temp8 = (uint8_t)(LimitCheckDisable << 4);
- Status = VL53L0X_UpdateByte(Dev,
- VL53L0X_REG_MSRC_CONFIG_CONTROL,
- 0xEF, Temp8);
-
- break;
-
-
- default:
- Status = VL53L0X_ERROR_INVALID_PARAMS;
-
- }
-
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- if (LimitCheckEnable == 0) {
- VL53L0X_SETARRAYPARAMETERFIELD(Dev, LimitChecksEnable,
- LimitCheckId, 0);
- } else {
- VL53L0X_SETARRAYPARAMETERFIELD(Dev, LimitChecksEnable,
- LimitCheckId, 1);
- }
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetLimitCheckEnable(VL53L0X_DEV Dev, uint16_t LimitCheckId,
- uint8_t *pLimitCheckEnable)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t Temp8;
-
- LOG_FUNCTION_START("");
-
- if (LimitCheckId >= VL53L0X_CHECKENABLE_NUMBER_OF_CHECKS) {
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- *pLimitCheckEnable = 0;
- } else {
- VL53L0X_GETARRAYPARAMETERFIELD(Dev, LimitChecksEnable,
- LimitCheckId, Temp8);
- *pLimitCheckEnable = Temp8;
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetLimitCheckValue(VL53L0X_DEV Dev, uint16_t LimitCheckId,
- FixPoint1616_t LimitCheckValue)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t Temp8;
-
- LOG_FUNCTION_START("");
-
- VL53L0X_GETARRAYPARAMETERFIELD(Dev, LimitChecksEnable, LimitCheckId,
- Temp8);
-
- if (Temp8 == 0) { /* disabled write only internal value */
- VL53L0X_SETARRAYPARAMETERFIELD(Dev, LimitChecksValue,
- LimitCheckId, LimitCheckValue);
- } else {
-
- switch (LimitCheckId) {
-
- case VL53L0X_CHECKENABLE_SIGMA_FINAL_RANGE:
- /* internal computation: */
- VL53L0X_SETARRAYPARAMETERFIELD(Dev, LimitChecksValue,
- VL53L0X_CHECKENABLE_SIGMA_FINAL_RANGE,
- LimitCheckValue);
- break;
-
- case VL53L0X_CHECKENABLE_SIGNAL_RATE_FINAL_RANGE:
-
- Status = VL53L0X_WrWord(Dev,
- VL53L0X_REG_FINAL_RANGE_CONFIG_MIN_COUNT_RATE_RTN_LIMIT,
- VL53L0X_FIXPOINT1616TOFIXPOINT97(
- LimitCheckValue));
-
- break;
-
- case VL53L0X_CHECKENABLE_SIGNAL_REF_CLIP:
-
- /* internal computation: */
- VL53L0X_SETARRAYPARAMETERFIELD(Dev, LimitChecksValue,
- VL53L0X_CHECKENABLE_SIGNAL_REF_CLIP,
- LimitCheckValue);
-
- break;
-
- case VL53L0X_CHECKENABLE_RANGE_IGNORE_THRESHOLD:
-
- /* internal computation: */
- VL53L0X_SETARRAYPARAMETERFIELD(Dev, LimitChecksValue,
- VL53L0X_CHECKENABLE_RANGE_IGNORE_THRESHOLD,
- LimitCheckValue);
-
- break;
-
- case VL53L0X_CHECKENABLE_SIGNAL_RATE_MSRC:
- case VL53L0X_CHECKENABLE_SIGNAL_RATE_PRE_RANGE:
-
- Status = VL53L0X_WrWord(Dev,
- VL53L0X_REG_PRE_RANGE_MIN_COUNT_RATE_RTN_LIMIT,
- VL53L0X_FIXPOINT1616TOFIXPOINT97(
- LimitCheckValue));
-
- break;
-
- default:
- Status = VL53L0X_ERROR_INVALID_PARAMS;
-
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- VL53L0X_SETARRAYPARAMETERFIELD(Dev, LimitChecksValue,
- LimitCheckId, LimitCheckValue);
- }
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetLimitCheckValue(VL53L0X_DEV Dev, uint16_t LimitCheckId,
- FixPoint1616_t *pLimitCheckValue)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t EnableZeroValue = 0;
- uint16_t Temp16;
- FixPoint1616_t TempFix1616;
-
- LOG_FUNCTION_START("");
-
- switch (LimitCheckId) {
-
- case VL53L0X_CHECKENABLE_SIGMA_FINAL_RANGE:
- /* internal computation: */
- VL53L0X_GETARRAYPARAMETERFIELD(Dev, LimitChecksValue,
- VL53L0X_CHECKENABLE_SIGMA_FINAL_RANGE, TempFix1616);
- EnableZeroValue = 0;
- break;
-
- case VL53L0X_CHECKENABLE_SIGNAL_RATE_FINAL_RANGE:
- Status = VL53L0X_RdWord(Dev,
- VL53L0X_REG_FINAL_RANGE_CONFIG_MIN_COUNT_RATE_RTN_LIMIT,
- &Temp16);
- if (Status == VL53L0X_ERROR_NONE)
- TempFix1616 = VL53L0X_FIXPOINT97TOFIXPOINT1616(Temp16);
-
-
- EnableZeroValue = 1;
- break;
-
- case VL53L0X_CHECKENABLE_SIGNAL_REF_CLIP:
- /* internal computation: */
- VL53L0X_GETARRAYPARAMETERFIELD(Dev, LimitChecksValue,
- VL53L0X_CHECKENABLE_SIGNAL_REF_CLIP, TempFix1616);
- EnableZeroValue = 0;
- break;
-
- case VL53L0X_CHECKENABLE_RANGE_IGNORE_THRESHOLD:
- /* internal computation: */
- VL53L0X_GETARRAYPARAMETERFIELD(Dev, LimitChecksValue,
- VL53L0X_CHECKENABLE_RANGE_IGNORE_THRESHOLD, TempFix1616);
- EnableZeroValue = 0;
- break;
-
- case VL53L0X_CHECKENABLE_SIGNAL_RATE_MSRC:
- case VL53L0X_CHECKENABLE_SIGNAL_RATE_PRE_RANGE:
- Status = VL53L0X_RdWord(Dev,
- VL53L0X_REG_PRE_RANGE_MIN_COUNT_RATE_RTN_LIMIT,
- &Temp16);
- if (Status == VL53L0X_ERROR_NONE)
- TempFix1616 = VL53L0X_FIXPOINT97TOFIXPOINT1616(Temp16);
-
-
- EnableZeroValue = 0;
- break;
-
- default:
- Status = VL53L0X_ERROR_INVALID_PARAMS;
-
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
-
- if (EnableZeroValue == 1) {
-
- if (TempFix1616 == 0) {
- /* disabled: return value from memory */
- VL53L0X_GETARRAYPARAMETERFIELD(Dev,
- LimitChecksValue, LimitCheckId,
- TempFix1616);
- *pLimitCheckValue = TempFix1616;
- VL53L0X_SETARRAYPARAMETERFIELD(Dev,
- LimitChecksEnable, LimitCheckId, 0);
- } else {
- *pLimitCheckValue = TempFix1616;
- VL53L0X_SETARRAYPARAMETERFIELD(Dev,
- LimitChecksValue, LimitCheckId,
- TempFix1616);
- VL53L0X_SETARRAYPARAMETERFIELD(Dev,
- LimitChecksEnable, LimitCheckId, 1);
- }
- } else {
- *pLimitCheckValue = TempFix1616;
- }
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-
-}
-
-VL53L0X_Error VL53L0X_GetLimitCheckCurrent(VL53L0X_DEV Dev, uint16_t LimitCheckId,
- FixPoint1616_t *pLimitCheckCurrent)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- VL53L0X_RangingMeasurementData_t LastRangeDataBuffer;
-
- LOG_FUNCTION_START("");
-
- if (LimitCheckId >= VL53L0X_CHECKENABLE_NUMBER_OF_CHECKS) {
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- } else {
- switch (LimitCheckId) {
- case VL53L0X_CHECKENABLE_SIGMA_FINAL_RANGE:
- /* Need to run a ranging to have the latest values */
- *pLimitCheckCurrent = PALDevDataGet(Dev, SigmaEstimate);
-
- break;
-
- case VL53L0X_CHECKENABLE_SIGNAL_RATE_FINAL_RANGE:
- /* Need to run a ranging to have the latest values */
- LastRangeDataBuffer = PALDevDataGet(Dev,
- LastRangeMeasure);
- *pLimitCheckCurrent =
- LastRangeDataBuffer.SignalRateRtnMegaCps;
-
- break;
-
- case VL53L0X_CHECKENABLE_SIGNAL_REF_CLIP:
- /* Need to run a ranging to have the latest values */
- *pLimitCheckCurrent = PALDevDataGet(Dev,
- LastSignalRefMcps);
-
- break;
-
- case VL53L0X_CHECKENABLE_RANGE_IGNORE_THRESHOLD:
- /* Need to run a ranging to have the latest values */
- LastRangeDataBuffer = PALDevDataGet(Dev,
- LastRangeMeasure);
- *pLimitCheckCurrent =
- LastRangeDataBuffer.SignalRateRtnMegaCps;
-
- break;
-
- case VL53L0X_CHECKENABLE_SIGNAL_RATE_MSRC:
- /* Need to run a ranging to have the latest values */
- LastRangeDataBuffer = PALDevDataGet(Dev,
- LastRangeMeasure);
- *pLimitCheckCurrent =
- LastRangeDataBuffer.SignalRateRtnMegaCps;
-
- break;
-
- case VL53L0X_CHECKENABLE_SIGNAL_RATE_PRE_RANGE:
- /* Need to run a ranging to have the latest values */
- LastRangeDataBuffer = PALDevDataGet(Dev,
- LastRangeMeasure);
- *pLimitCheckCurrent =
- LastRangeDataBuffer.SignalRateRtnMegaCps;
-
- break;
-
- default:
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- }
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-
-}
-
-/*
- * WRAPAROUND Check
- */
-VL53L0X_Error VL53L0X_SetWrapAroundCheckEnable(VL53L0X_DEV Dev,
- uint8_t WrapAroundCheckEnable)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t Byte;
- uint8_t WrapAroundCheckEnableInt;
-
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_RdByte(Dev, VL53L0X_REG_SYSTEM_SEQUENCE_CONFIG, &Byte);
- if (WrapAroundCheckEnable == 0) {
- /* Disable wraparound */
- Byte = Byte & 0x7F;
- WrapAroundCheckEnableInt = 0;
- } else {
- /*Enable wraparound */
- Byte = Byte | 0x80;
- WrapAroundCheckEnableInt = 1;
- }
-
- Status = VL53L0X_WrByte(Dev, VL53L0X_REG_SYSTEM_SEQUENCE_CONFIG, Byte);
-
- if (Status == VL53L0X_ERROR_NONE) {
- PALDevDataSet(Dev, SequenceConfig, Byte);
- VL53L0X_SETPARAMETERFIELD(Dev, WrapAroundCheckEnable,
- WrapAroundCheckEnableInt);
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetWrapAroundCheckEnable(VL53L0X_DEV Dev,
- uint8_t *pWrapAroundCheckEnable)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t data;
-
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_RdByte(Dev, VL53L0X_REG_SYSTEM_SEQUENCE_CONFIG, &data);
- if (Status == VL53L0X_ERROR_NONE) {
- PALDevDataSet(Dev, SequenceConfig, data);
- if (data & (0x01 << 7))
- *pWrapAroundCheckEnable = 0x01;
- else
- *pWrapAroundCheckEnable = 0x00;
- }
- if (Status == VL53L0X_ERROR_NONE) {
- VL53L0X_SETPARAMETERFIELD(Dev, WrapAroundCheckEnable,
- *pWrapAroundCheckEnable);
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetDmaxCalParameters(VL53L0X_DEV Dev,
- uint16_t RangeMilliMeter, FixPoint1616_t SignalRateRtnMegaCps)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- FixPoint1616_t SignalRateRtnMegaCpsTemp = 0;
-
- LOG_FUNCTION_START("");
-
- /* Check if one of input parameter is zero, in that case the
- * value are get from NVM */
- if ((RangeMilliMeter == 0) || (SignalRateRtnMegaCps == 0)) {
- /* NVM parameters */
- /* Run VL53L0X_get_info_from_device with option 4 to get
- * signal rate at 400 mm if the value have been already
- * get this function will return with no access to device */
- VL53L0X_get_info_from_device(Dev, 4);
-
- SignalRateRtnMegaCpsTemp = VL53L0X_GETDEVICESPECIFICPARAMETER(
- Dev, SignalRateMeasFixed400mm);
-
- PALDevDataSet(Dev, DmaxCalRangeMilliMeter, 400);
- PALDevDataSet(Dev, DmaxCalSignalRateRtnMegaCps,
- SignalRateRtnMegaCpsTemp);
- } else {
- /* User parameters */
- PALDevDataSet(Dev, DmaxCalRangeMilliMeter, RangeMilliMeter);
- PALDevDataSet(Dev, DmaxCalSignalRateRtnMegaCps,
- SignalRateRtnMegaCps);
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetDmaxCalParameters(VL53L0X_DEV Dev,
- uint16_t *pRangeMilliMeter, FixPoint1616_t *pSignalRateRtnMegaCps)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- LOG_FUNCTION_START("");
-
- *pRangeMilliMeter = PALDevDataGet(Dev, DmaxCalRangeMilliMeter);
- *pSignalRateRtnMegaCps = PALDevDataGet(Dev,
- DmaxCalSignalRateRtnMegaCps);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-/* End Group PAL Parameters Functions */
-
-/* Group PAL Measurement Functions */
-VL53L0X_Error VL53L0X_PerformSingleMeasurement(VL53L0X_DEV Dev)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- VL53L0X_DeviceModes DeviceMode;
-
- LOG_FUNCTION_START("");
-
- /* Get Current DeviceMode */
- Status = VL53L0X_GetDeviceMode(Dev, &DeviceMode);
-
- /* Start immediately to run a single ranging measurement in case of
- * single ranging or single histogram */
- if (Status == VL53L0X_ERROR_NONE
- && DeviceMode == VL53L0X_DEVICEMODE_SINGLE_RANGING)
- Status = VL53L0X_StartMeasurement(Dev);
-
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_measurement_poll_for_completion(Dev);
-
-
- /* Change PAL State in case of single ranging or single histogram */
- if (Status == VL53L0X_ERROR_NONE
- && DeviceMode == VL53L0X_DEVICEMODE_SINGLE_RANGING)
- PALDevDataSet(Dev, PalState, VL53L0X_STATE_IDLE);
-
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_PerformSingleHistogramMeasurement(VL53L0X_DEV Dev,
- VL53L0X_HistogramMeasurementData_t *pHistogramMeasurementData)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NOT_IMPLEMENTED;
- LOG_FUNCTION_START("");
-
- /* not implemented on VL53L0X */
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_PerformRefCalibration(VL53L0X_DEV Dev, uint8_t *pVhvSettings,
- uint8_t *pPhaseCal)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_perform_ref_calibration(Dev, pVhvSettings,
- pPhaseCal, 1);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_PerformXTalkMeasurement(VL53L0X_DEV Dev,
- uint32_t TimeoutMs, FixPoint1616_t *pXtalkPerSpad,
- uint8_t *pAmbientTooHigh)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NOT_IMPLEMENTED;
- LOG_FUNCTION_START("");
-
- /* not implemented on VL53L0X */
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_PerformXTalkCalibration(VL53L0X_DEV Dev,
- FixPoint1616_t XTalkCalDistance,
- FixPoint1616_t *pXTalkCompensationRateMegaCps)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_perform_xtalk_calibration(Dev, XTalkCalDistance,
- pXTalkCompensationRateMegaCps);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_PerformOffsetCalibration(VL53L0X_DEV Dev,
- FixPoint1616_t CalDistanceMilliMeter, int32_t *pOffsetMicroMeter)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_perform_offset_calibration(Dev, CalDistanceMilliMeter,
- pOffsetMicroMeter);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_CheckAndLoadInterruptSettings(VL53L0X_DEV Dev,
- uint8_t StartNotStopFlag)
-{
- uint8_t InterruptConfig;
- FixPoint1616_t ThresholdLow;
- FixPoint1616_t ThresholdHigh;
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- InterruptConfig = VL53L0X_GETDEVICESPECIFICPARAMETER(Dev,
- Pin0GpioFunctionality);
-
- if ((InterruptConfig ==
- VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_LOW) ||
- (InterruptConfig ==
- VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_HIGH) ||
- (InterruptConfig ==
- VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_OUT)) {
-
- Status = VL53L0X_GetInterruptThresholds(Dev,
- VL53L0X_DEVICEMODE_CONTINUOUS_RANGING,
- &ThresholdLow, &ThresholdHigh);
-
- if (((ThresholdLow > 255*65536) ||
- (ThresholdHigh > 255*65536)) &&
- (Status == VL53L0X_ERROR_NONE)) {
-
- if (StartNotStopFlag != 0) {
- Status = VL53L0X_load_tuning_settings(Dev,
- InterruptThresholdSettings);
- } else {
- Status |= VL53L0X_WrByte(Dev, 0xFF, 0x04);
- Status |= VL53L0X_WrByte(Dev, 0x70, 0x00);
- Status |= VL53L0X_WrByte(Dev, 0xFF, 0x00);
- Status |= VL53L0X_WrByte(Dev, 0x80, 0x00);
- }
-
- }
-
-
- }
-
- return Status;
-
-}
-
-
-VL53L0X_Error VL53L0X_StartMeasurement(VL53L0X_DEV Dev)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- VL53L0X_DeviceModes DeviceMode;
- uint8_t Byte;
- uint8_t StartStopByte = VL53L0X_REG_SYSRANGE_MODE_START_STOP;
- uint32_t LoopNb;
- LOG_FUNCTION_START("");
-
- /* Get Current DeviceMode */
- VL53L0X_GetDeviceMode(Dev, &DeviceMode);
-
- switch (DeviceMode) {
- case VL53L0X_DEVICEMODE_SINGLE_RANGING:
- Status = VL53L0X_WrByte(Dev, VL53L0X_REG_SYSRANGE_START, 0x01);
-
- Byte = StartStopByte;
- if (Status == VL53L0X_ERROR_NONE) {
- /* Wait until start bit has been cleared */
- LoopNb = 0;
- do {
- if (LoopNb > 0)
- Status = VL53L0X_RdByte(Dev,
- VL53L0X_REG_SYSRANGE_START, &Byte);
- LoopNb = LoopNb + 1;
- } while (((Byte & StartStopByte) == StartStopByte)
- && (Status == VL53L0X_ERROR_NONE)
- && (LoopNb < VL53L0X_DEFAULT_MAX_LOOP));
-
- if (LoopNb >= VL53L0X_DEFAULT_MAX_LOOP)
- Status = VL53L0X_ERROR_TIME_OUT;
-
- }
-
- break;
- case VL53L0X_DEVICEMODE_CONTINUOUS_RANGING:
- /* Back-to-back mode */
-
- /* Check if need to apply interrupt settings */
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_CheckAndLoadInterruptSettings(Dev, 1);
-
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_SYSRANGE_START,
- VL53L0X_REG_SYSRANGE_MODE_BACKTOBACK);
- if (Status == VL53L0X_ERROR_NONE) {
- /* Set PAL State to Running */
- PALDevDataSet(Dev, PalState, VL53L0X_STATE_RUNNING);
- }
- break;
- case VL53L0X_DEVICEMODE_CONTINUOUS_TIMED_RANGING:
- /* Continuous mode */
- /* Check if need to apply interrupt settings */
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_CheckAndLoadInterruptSettings(Dev, 1);
-
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_SYSRANGE_START,
- VL53L0X_REG_SYSRANGE_MODE_TIMED);
-
- if (Status == VL53L0X_ERROR_NONE) {
- /* Set PAL State to Running */
- PALDevDataSet(Dev, PalState, VL53L0X_STATE_RUNNING);
- }
- break;
- default:
- /* Selected mode not supported */
- Status = VL53L0X_ERROR_MODE_NOT_SUPPORTED;
- }
-
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_StopMeasurement(VL53L0X_DEV Dev)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_WrByte(Dev, VL53L0X_REG_SYSRANGE_START, 0x00);
-
- if (Status == VL53L0X_ERROR_NONE) {
- /* Set PAL State to Idle */
- PALDevDataSet(Dev, PalState, VL53L0X_STATE_IDLE);
- }
-
- /* Check if need to apply interrupt settings */
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_CheckAndLoadInterruptSettings(Dev, 0);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetMeasurementDataReady(VL53L0X_DEV Dev,
- uint8_t *pMeasurementDataReady)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t SysRangeStatusRegister;
- uint8_t InterruptConfig;
- uint32_t InterruptMask;
- LOG_FUNCTION_START("");
-
- InterruptConfig = VL53L0X_GETDEVICESPECIFICPARAMETER(Dev,
- Pin0GpioFunctionality);
-
- if (InterruptConfig ==
- VL53L0X_REG_SYSTEM_INTERRUPT_GPIO_NEW_SAMPLE_READY) {
- Status = VL53L0X_GetInterruptMaskStatus(Dev, &InterruptMask);
- if (InterruptMask ==
- VL53L0X_REG_SYSTEM_INTERRUPT_GPIO_NEW_SAMPLE_READY)
- *pMeasurementDataReady = 1;
- else
- *pMeasurementDataReady = 0;
- } else {
- Status = VL53L0X_RdByte(Dev, VL53L0X_REG_RESULT_RANGE_STATUS,
- &SysRangeStatusRegister);
- if (Status == VL53L0X_ERROR_NONE) {
- if (SysRangeStatusRegister & 0x01)
- *pMeasurementDataReady = 1;
- else
- *pMeasurementDataReady = 0;
- }
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_WaitDeviceReadyForNewMeasurement(VL53L0X_DEV Dev,
- uint32_t MaxLoop)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NOT_IMPLEMENTED;
- LOG_FUNCTION_START("");
-
- /* not implemented for VL53L0X */
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-
-VL53L0X_Error VL53L0X_GetRangingMeasurementData(VL53L0X_DEV Dev,
- VL53L0X_RangingMeasurementData_t *pRangingMeasurementData)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t DeviceRangeStatus;
- uint8_t RangeFractionalEnable;
- uint8_t PalRangeStatus;
- uint8_t XTalkCompensationEnable;
- uint16_t AmbientRate;
- FixPoint1616_t SignalRate;
- uint16_t XTalkCompensationRateMegaCps;
- uint16_t EffectiveSpadRtnCount;
- uint16_t tmpuint16;
- uint16_t XtalkRangeMilliMeter;
- uint16_t LinearityCorrectiveGain;
- uint8_t localBuffer[12];
- VL53L0X_RangingMeasurementData_t LastRangeDataBuffer;
-
- LOG_FUNCTION_START("");
-
- /*
- * use multi read even if some registers are not useful, result will
- * be more efficient
- * start reading at 0x14 dec20
- * end reading at 0x21 dec33 total 14 bytes to read
- */
- Status = VL53L0X_ReadMulti(Dev, 0x14, localBuffer, 12);
-
- if (Status == VL53L0X_ERROR_NONE) {
-
- pRangingMeasurementData->ZoneId = 0; /* Only one zone */
- pRangingMeasurementData->TimeStamp = 0; /* Not Implemented */
-
- tmpuint16 = VL53L0X_MAKEUINT16(localBuffer[11], localBuffer[10]);
- /* cut1.1 if SYSTEM__RANGE_CONFIG if 1 range is 2bits fractional
- *(format 11.2) else no fractional
- */
-
- pRangingMeasurementData->MeasurementTimeUsec = 0;
-
- SignalRate = VL53L0X_FIXPOINT97TOFIXPOINT1616(
- VL53L0X_MAKEUINT16(localBuffer[7], localBuffer[6]));
- /* peak_signal_count_rate_rtn_mcps */
- pRangingMeasurementData->SignalRateRtnMegaCps = SignalRate;
-
- AmbientRate = VL53L0X_MAKEUINT16(localBuffer[9], localBuffer[8]);
- pRangingMeasurementData->AmbientRateRtnMegaCps =
- VL53L0X_FIXPOINT97TOFIXPOINT1616(AmbientRate);
-
- EffectiveSpadRtnCount = VL53L0X_MAKEUINT16(localBuffer[3],
- localBuffer[2]);
- /* EffectiveSpadRtnCount is 8.8 format */
- pRangingMeasurementData->EffectiveSpadRtnCount =
- EffectiveSpadRtnCount;
-
- DeviceRangeStatus = localBuffer[0];
-
- /* Get Linearity Corrective Gain */
- LinearityCorrectiveGain = PALDevDataGet(Dev,
- LinearityCorrectiveGain);
-
- /* Get ranging configuration */
- RangeFractionalEnable = PALDevDataGet(Dev,
- RangeFractionalEnable);
-
- if (LinearityCorrectiveGain != 1000) {
-
- tmpuint16 = (uint16_t)((LinearityCorrectiveGain
- * tmpuint16 + 500) / 1000);
-
- /* Implement Xtalk */
- VL53L0X_GETPARAMETERFIELD(Dev,
- XTalkCompensationRateMegaCps,
- XTalkCompensationRateMegaCps);
- VL53L0X_GETPARAMETERFIELD(Dev, XTalkCompensationEnable,
- XTalkCompensationEnable);
-
- if (XTalkCompensationEnable) {
-
- if ((SignalRate
- - ((XTalkCompensationRateMegaCps
- * EffectiveSpadRtnCount) >> 8))
- <= 0) {
- if (RangeFractionalEnable)
- XtalkRangeMilliMeter = 8888;
- else
- XtalkRangeMilliMeter = 8888
- << 2;
- } else {
- XtalkRangeMilliMeter =
- (tmpuint16 * SignalRate)
- / (SignalRate
- - ((XTalkCompensationRateMegaCps
- * EffectiveSpadRtnCount)
- >> 8));
- }
-
- tmpuint16 = XtalkRangeMilliMeter;
- }
-
- }
-
- if (RangeFractionalEnable) {
- pRangingMeasurementData->RangeMilliMeter =
- (uint16_t)((tmpuint16) >> 2);
- pRangingMeasurementData->RangeFractionalPart =
- (uint8_t)((tmpuint16 & 0x03) << 6);
- } else {
- pRangingMeasurementData->RangeMilliMeter = tmpuint16;
- pRangingMeasurementData->RangeFractionalPart = 0;
- }
-
- /*
- * For a standard definition of RangeStatus, this should
- * return 0 in case of good result after a ranging
- * The range status depends on the device so call a device
- * specific function to obtain the right Status.
- */
- Status |= VL53L0X_get_pal_range_status(Dev, DeviceRangeStatus,
- SignalRate, EffectiveSpadRtnCount,
- pRangingMeasurementData, &PalRangeStatus);
-
- if (Status == VL53L0X_ERROR_NONE)
- pRangingMeasurementData->RangeStatus = PalRangeStatus;
-
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- /* Copy last read data into Dev buffer */
- LastRangeDataBuffer = PALDevDataGet(Dev, LastRangeMeasure);
-
- LastRangeDataBuffer.RangeMilliMeter =
- pRangingMeasurementData->RangeMilliMeter;
- LastRangeDataBuffer.RangeFractionalPart =
- pRangingMeasurementData->RangeFractionalPart;
- LastRangeDataBuffer.RangeDMaxMilliMeter =
- pRangingMeasurementData->RangeDMaxMilliMeter;
- LastRangeDataBuffer.MeasurementTimeUsec =
- pRangingMeasurementData->MeasurementTimeUsec;
- LastRangeDataBuffer.SignalRateRtnMegaCps =
- pRangingMeasurementData->SignalRateRtnMegaCps;
- LastRangeDataBuffer.AmbientRateRtnMegaCps =
- pRangingMeasurementData->AmbientRateRtnMegaCps;
- LastRangeDataBuffer.EffectiveSpadRtnCount =
- pRangingMeasurementData->EffectiveSpadRtnCount;
- LastRangeDataBuffer.RangeStatus =
- pRangingMeasurementData->RangeStatus;
-
- PALDevDataSet(Dev, LastRangeMeasure, LastRangeDataBuffer);
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetMeasurementRefSignal(VL53L0X_DEV Dev,
- FixPoint1616_t *pMeasurementRefSignal)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- *pMeasurementRefSignal = PALDevDataGet(Dev, LastSignalRefMcps);
-
- LOG_FUNCTION_END(Status);
- return Status;
-
-}
-
-VL53L0X_Error VL53L0X_GetHistogramMeasurementData(VL53L0X_DEV Dev,
- VL53L0X_HistogramMeasurementData_t *pHistogramMeasurementData)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NOT_IMPLEMENTED;
- LOG_FUNCTION_START("");
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_PerformSingleRangingMeasurement(VL53L0X_DEV Dev,
- VL53L0X_RangingMeasurementData_t *pRangingMeasurementData)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- LOG_FUNCTION_START("");
-
- /* This function will do a complete single ranging
- * Here we fix the mode! */
- Status = VL53L0X_SetDeviceMode(Dev, VL53L0X_DEVICEMODE_SINGLE_RANGING);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_PerformSingleMeasurement(Dev);
-
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_GetRangingMeasurementData(Dev,
- pRangingMeasurementData);
-
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_ClearInterruptMask(Dev, 0);
-
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetNumberOfROIZones(VL53L0X_DEV Dev,
- uint8_t NumberOfROIZones)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- LOG_FUNCTION_START("");
-
- if (NumberOfROIZones != 1)
- Status = VL53L0X_ERROR_INVALID_PARAMS;
-
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetNumberOfROIZones(VL53L0X_DEV Dev,
- uint8_t *pNumberOfROIZones)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- LOG_FUNCTION_START("");
-
- *pNumberOfROIZones = 1;
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetMaxNumberOfROIZones(VL53L0X_DEV Dev,
- uint8_t *pMaxNumberOfROIZones)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- LOG_FUNCTION_START("");
-
- *pMaxNumberOfROIZones = 1;
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-/* End Group PAL Measurement Functions */
-
-VL53L0X_Error VL53L0X_SetGpioConfig(VL53L0X_DEV Dev, uint8_t Pin,
- VL53L0X_DeviceModes DeviceMode, VL53L0X_GpioFunctionality Functionality,
- VL53L0X_InterruptPolarity Polarity)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t data;
-
- LOG_FUNCTION_START("");
-
- if (Pin != 0) {
- Status = VL53L0X_ERROR_GPIO_NOT_EXISTING;
- } else if (DeviceMode == VL53L0X_DEVICEMODE_GPIO_DRIVE) {
- if (Polarity == VL53L0X_INTERRUPTPOLARITY_LOW)
- data = 0x10;
- else
- data = 1;
-
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_GPIO_HV_MUX_ACTIVE_HIGH, data);
-
- } else if (DeviceMode == VL53L0X_DEVICEMODE_GPIO_OSC) {
-
- Status |= VL53L0X_WrByte(Dev, 0xff, 0x01);
- Status |= VL53L0X_WrByte(Dev, 0x00, 0x00);
-
- Status |= VL53L0X_WrByte(Dev, 0xff, 0x00);
- Status |= VL53L0X_WrByte(Dev, 0x80, 0x01);
- Status |= VL53L0X_WrByte(Dev, 0x85, 0x02);
-
- Status |= VL53L0X_WrByte(Dev, 0xff, 0x04);
- Status |= VL53L0X_WrByte(Dev, 0xcd, 0x00);
- Status |= VL53L0X_WrByte(Dev, 0xcc, 0x11);
-
- Status |= VL53L0X_WrByte(Dev, 0xff, 0x07);
- Status |= VL53L0X_WrByte(Dev, 0xbe, 0x00);
-
- Status |= VL53L0X_WrByte(Dev, 0xff, 0x06);
- Status |= VL53L0X_WrByte(Dev, 0xcc, 0x09);
-
- Status |= VL53L0X_WrByte(Dev, 0xff, 0x00);
- Status |= VL53L0X_WrByte(Dev, 0xff, 0x01);
- Status |= VL53L0X_WrByte(Dev, 0x00, 0x00);
-
- } else {
-
- if (Status == VL53L0X_ERROR_NONE) {
- switch (Functionality) {
- case VL53L0X_GPIOFUNCTIONALITY_OFF:
- data = 0x00;
- break;
- case VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_LOW:
- data = 0x01;
- break;
- case VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_HIGH:
- data = 0x02;
- break;
- case VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_OUT:
- data = 0x03;
- break;
- case VL53L0X_GPIOFUNCTIONALITY_NEW_MEASURE_READY:
- data = 0x04;
- break;
- default:
- Status =
- VL53L0X_ERROR_GPIO_FUNCTIONALITY_NOT_SUPPORTED;
- }
- }
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_SYSTEM_INTERRUPT_CONFIG_GPIO, data);
-
- if (Status == VL53L0X_ERROR_NONE) {
- if (Polarity == VL53L0X_INTERRUPTPOLARITY_LOW)
- data = 0;
- else
- data = (uint8_t)(1 << 4);
-
- Status = VL53L0X_UpdateByte(Dev,
- VL53L0X_REG_GPIO_HV_MUX_ACTIVE_HIGH, 0xEF, data);
- }
-
- if (Status == VL53L0X_ERROR_NONE)
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev,
- Pin0GpioFunctionality, Functionality);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_ClearInterruptMask(Dev, 0);
-
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetGpioConfig(VL53L0X_DEV Dev, uint8_t Pin,
- VL53L0X_DeviceModes *pDeviceMode,
- VL53L0X_GpioFunctionality *pFunctionality,
- VL53L0X_InterruptPolarity *pPolarity)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- VL53L0X_GpioFunctionality GpioFunctionality;
- uint8_t data;
-
- LOG_FUNCTION_START("");
-
- /* pDeviceMode not managed by Ewok it return the current mode */
-
- Status = VL53L0X_GetDeviceMode(Dev, pDeviceMode);
-
- if (Status == VL53L0X_ERROR_NONE) {
- if (Pin != 0) {
- Status = VL53L0X_ERROR_GPIO_NOT_EXISTING;
- } else {
- Status = VL53L0X_RdByte(Dev,
- VL53L0X_REG_SYSTEM_INTERRUPT_CONFIG_GPIO, &data);
- }
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- switch (data & 0x07) {
- case 0x00:
- GpioFunctionality = VL53L0X_GPIOFUNCTIONALITY_OFF;
- break;
- case 0x01:
- GpioFunctionality =
- VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_LOW;
- break;
- case 0x02:
- GpioFunctionality =
- VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_HIGH;
- break;
- case 0x03:
- GpioFunctionality =
- VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_OUT;
- break;
- case 0x04:
- GpioFunctionality =
- VL53L0X_GPIOFUNCTIONALITY_NEW_MEASURE_READY;
- break;
- default:
- Status = VL53L0X_ERROR_GPIO_FUNCTIONALITY_NOT_SUPPORTED;
- }
- }
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_RdByte(Dev, VL53L0X_REG_GPIO_HV_MUX_ACTIVE_HIGH,
- &data);
-
- if (Status == VL53L0X_ERROR_NONE) {
- if ((data & (uint8_t)(1 << 4)) == 0)
- *pPolarity = VL53L0X_INTERRUPTPOLARITY_LOW;
- else
- *pPolarity = VL53L0X_INTERRUPTPOLARITY_HIGH;
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- *pFunctionality = GpioFunctionality;
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev, Pin0GpioFunctionality,
- GpioFunctionality);
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetInterruptThresholds(VL53L0X_DEV Dev,
- VL53L0X_DeviceModes DeviceMode, FixPoint1616_t ThresholdLow,
- FixPoint1616_t ThresholdHigh)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint16_t Threshold16;
- LOG_FUNCTION_START("");
-
- /* no dependency on DeviceMode for Ewok */
- /* Need to divide by 2 because the FW will apply a x2 */
- Threshold16 = (uint16_t)((ThresholdLow >> 17) & 0x00fff);
- Status = VL53L0X_WrWord(Dev, VL53L0X_REG_SYSTEM_THRESH_LOW, Threshold16);
-
- if (Status == VL53L0X_ERROR_NONE) {
- /* Need to divide by 2 because the FW will apply a x2 */
- Threshold16 = (uint16_t)((ThresholdHigh >> 17) & 0x00fff);
- Status = VL53L0X_WrWord(Dev, VL53L0X_REG_SYSTEM_THRESH_HIGH,
- Threshold16);
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetInterruptThresholds(VL53L0X_DEV Dev,
- VL53L0X_DeviceModes DeviceMode, FixPoint1616_t *pThresholdLow,
- FixPoint1616_t *pThresholdHigh)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint16_t Threshold16;
- LOG_FUNCTION_START("");
-
- /* no dependency on DeviceMode for Ewok */
-
- Status = VL53L0X_RdWord(Dev, VL53L0X_REG_SYSTEM_THRESH_LOW, &Threshold16);
- /* Need to multiply by 2 because the FW will apply a x2 */
- *pThresholdLow = (FixPoint1616_t)((0x00fff & Threshold16) << 17);
-
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_RdWord(Dev, VL53L0X_REG_SYSTEM_THRESH_HIGH,
- &Threshold16);
- /* Need to multiply by 2 because the FW will apply a x2 */
- *pThresholdHigh =
- (FixPoint1616_t)((0x00fff & Threshold16) << 17);
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetStopCompletedStatus(VL53L0X_DEV Dev,
- uint32_t *pStopStatus)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t Byte = 0;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_WrByte(Dev, 0xFF, 0x01);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_RdByte(Dev, 0x04, &Byte);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_WrByte(Dev, 0xFF, 0x0);
-
- *pStopStatus = Byte;
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-/* Group PAL Interrupt Functions */
-VL53L0X_Error VL53L0X_ClearInterruptMask(VL53L0X_DEV Dev, uint32_t InterruptMask)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t LoopCount;
- uint8_t Byte;
- LOG_FUNCTION_START("");
-
- /* clear bit 0 range interrupt, bit 1 error interrupt */
- LoopCount = 0;
- do {
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_SYSTEM_INTERRUPT_CLEAR, 0x01);
- Status |= VL53L0X_WrByte(Dev,
- VL53L0X_REG_SYSTEM_INTERRUPT_CLEAR, 0x00);
- Status |= VL53L0X_RdByte(Dev,
- VL53L0X_REG_RESULT_INTERRUPT_STATUS, &Byte);
- LoopCount++;
- } while (((Byte & 0x07) != 0x00)
- && (LoopCount < 3)
- && (Status == VL53L0X_ERROR_NONE));
-
-
- if (LoopCount >= 3)
- Status = VL53L0X_ERROR_INTERRUPT_NOT_CLEARED;
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetInterruptMaskStatus(VL53L0X_DEV Dev,
- uint32_t *pInterruptMaskStatus)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t Byte;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_RdByte(Dev, VL53L0X_REG_RESULT_INTERRUPT_STATUS, &Byte);
- *pInterruptMaskStatus = Byte & 0x07;
-
- if (Byte & 0x18)
- Status = VL53L0X_ERROR_RANGE_ERROR;
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_EnableInterruptMask(VL53L0X_DEV Dev, uint32_t InterruptMask)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NOT_IMPLEMENTED;
- LOG_FUNCTION_START("");
-
- /* not implemented for VL53L0X */
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-/* End Group PAL Interrupt Functions */
-
-/* Group SPAD functions */
-
-VL53L0X_Error VL53L0X_SetSpadAmbientDamperThreshold(VL53L0X_DEV Dev,
- uint16_t SpadAmbientDamperThreshold)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_WrByte(Dev, 0xFF, 0x01);
- Status |= VL53L0X_WrWord(Dev, 0x40, SpadAmbientDamperThreshold);
- Status |= VL53L0X_WrByte(Dev, 0xFF, 0x00);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetSpadAmbientDamperThreshold(VL53L0X_DEV Dev,
- uint16_t *pSpadAmbientDamperThreshold)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_WrByte(Dev, 0xFF, 0x01);
- Status |= VL53L0X_RdWord(Dev, 0x40, pSpadAmbientDamperThreshold);
- Status |= VL53L0X_WrByte(Dev, 0xFF, 0x00);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_SetSpadAmbientDamperFactor(VL53L0X_DEV Dev,
- uint16_t SpadAmbientDamperFactor)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t Byte;
- LOG_FUNCTION_START("");
-
- Byte = (uint8_t)(SpadAmbientDamperFactor & 0x00FF);
-
- Status = VL53L0X_WrByte(Dev, 0xFF, 0x01);
- Status |= VL53L0X_WrByte(Dev, 0x42, Byte);
- Status |= VL53L0X_WrByte(Dev, 0xFF, 0x00);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetSpadAmbientDamperFactor(VL53L0X_DEV Dev,
- uint16_t *pSpadAmbientDamperFactor)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t Byte;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_WrByte(Dev, 0xFF, 0x01);
- Status |= VL53L0X_RdByte(Dev, 0x42, &Byte);
- Status |= VL53L0X_WrByte(Dev, 0xFF, 0x00);
- *pSpadAmbientDamperFactor = (uint16_t)Byte;
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-/* END Group SPAD functions */
-
-/*****************************************************************************
- * Internal functions
- *****************************************************************************/
-
-VL53L0X_Error VL53L0X_SetReferenceSpads(VL53L0X_DEV Dev, uint32_t count,
- uint8_t isApertureSpads)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_set_reference_spads(Dev, count, isApertureSpads);
-
- LOG_FUNCTION_END(Status);
-
- return Status;
-}
-
-VL53L0X_Error VL53L0X_GetReferenceSpads(VL53L0X_DEV Dev, uint32_t *pSpadCount,
- uint8_t *pIsApertureSpads)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_get_reference_spads(Dev, pSpadCount, pIsApertureSpads);
-
- LOG_FUNCTION_END(Status);
-
- return Status;
-}
-
-VL53L0X_Error VL53L0X_PerformRefSpadManagement(VL53L0X_DEV Dev,
- uint32_t *refSpadCount, uint8_t *isApertureSpads)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_perform_ref_spad_management(Dev, refSpadCount,
- isApertureSpads);
-
- LOG_FUNCTION_END(Status);
-
- return Status;
-}
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api.h b/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api.h
deleted file mode 100644
index 67762d8f9..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api.h
+++ /dev/null
@@ -1,1943 +0,0 @@
-/**
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2019-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-#ifndef _VL53L0X_API_H_
-#define _VL53L0X_API_H_
-
-#include "vl53l0x_api_strings.h"
-#include "vl53l0x_def.h"
-#include "vl53l0x_platform.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#ifdef _MSC_VER
-# ifdef VL53L0X_API_EXPORTS
-# define VL53L0X_API __declspec(dllexport)
-# else
-# define VL53L0X_API
-# endif
-#else
-# define VL53L0X_API
-#endif
-
-/** @defgroup VL53L0X_cut11_group VL53L0X cut1.1 Function Definition
- * @brief VL53L0X cut1.1 Function Definition
- * @{
- */
-
-/** @defgroup VL53L0X_general_group VL53L0X General Functions
- * @brief General functions and definitions
- * @{
- */
-
-VL53L0X_Error sequence_step_enabled(VL53L0X_DEV Dev,
- VL53L0X_SequenceStepId SequenceStepId, uint8_t SequenceConfig,
- uint8_t *pSequenceStepEnabled);
-
-VL53L0X_Error VL53L0X_CheckAndLoadInterruptSettings(VL53L0X_DEV Dev,
- uint8_t StartNotStopFlag);
-
-/**
- * @brief Return the VL53L0X PAL Implementation Version
- *
- * @note This function doesn't access to the device
- *
- * @param pVersion Pointer to current PAL Implementation Version
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetVersion(VL53L0X_Version_t *pVersion);
-
-/**
- * @brief Return the PAL Specification Version used for the current
- * implementation.
- *
- * @note This function doesn't access to the device
- *
- * @param pPalSpecVersion Pointer to current PAL Specification Version
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetPalSpecVersion(
- VL53L0X_Version_t *pPalSpecVersion);
-
-/**
- * @brief Reads the Product Revision for a for given Device
- * This function can be used to distinguish cut1.0 from cut1.1.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pProductRevisionMajor Pointer to Product Revision Major
- * for a given Device
- * @param pProductRevisionMinor Pointer to Product Revision Minor
- * for a given Device
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetProductRevision(VL53L0X_DEV Dev,
- uint8_t *pProductRevisionMajor, uint8_t *pProductRevisionMinor);
-
-/**
- * @brief Reads the Device information for given Device
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pVL53L0X_DeviceInfo Pointer to current device info for a given
- * Device
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetDeviceInfo(VL53L0X_DEV Dev,
- VL53L0X_DeviceInfo_t *pVL53L0X_DeviceInfo);
-
-/**
- * @brief Read current status of the error register for the selected device
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pDeviceErrorStatus Pointer to current error code of the device
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetDeviceErrorStatus(VL53L0X_DEV Dev,
- VL53L0X_DeviceError *pDeviceErrorStatus);
-
-/**
- * @brief Human readable Range Status string for a given RangeStatus
- *
- * @note This function doesn't access to the device
- *
- * @param RangeStatus The RangeStatus code as stored on
- * @a VL53L0X_RangingMeasurementData_t
- * @param pRangeStatusString The returned RangeStatus string.
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetRangeStatusString(uint8_t RangeStatus,
- char *pRangeStatusString);
-
-/**
- * @brief Human readable error string for a given Error Code
- *
- * @note This function doesn't access to the device
- *
- * @param ErrorCode The error code as stored on ::VL53L0X_DeviceError
- * @param pDeviceErrorString The error string corresponding to the ErrorCode
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetDeviceErrorString(
- VL53L0X_DeviceError ErrorCode, char *pDeviceErrorString);
-
-/**
- * @brief Human readable error string for current PAL error status
- *
- * @note This function doesn't access to the device
- *
- * @param PalErrorCode The error code as stored on @a VL53L0X_Error
- * @param pPalErrorString The error string corresponding to the
- * PalErrorCode
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetPalErrorString(VL53L0X_Error PalErrorCode,
- char *pPalErrorString);
-
-/**
- * @brief Human readable PAL State string
- *
- * @note This function doesn't access to the device
- *
- * @param PalStateCode The State code as stored on @a VL53L0X_State
- * @param pPalStateString The State string corresponding to the
- * PalStateCode
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetPalStateString(VL53L0X_State PalStateCode,
- char *pPalStateString);
-
-/**
- * @brief Reads the internal state of the PAL for a given Device
- *
- * @note This function doesn't access to the device
- *
- * @param Dev Device Handle
- * @param pPalState Pointer to current state of the PAL for a
- * given Device
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetPalState(VL53L0X_DEV Dev,
- VL53L0X_State *pPalState);
-
-/**
- * @brief Set the power mode for a given Device
- * The power mode can be Standby or Idle. Different level of both Standby and
- * Idle can exists.
- * This function should not be used when device is in Ranging state.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param PowerMode The value of the power mode to set.
- * see ::VL53L0X_PowerModes
- * Valid values are:
- * VL53L0X_POWERMODE_STANDBY_LEVEL1,
- * VL53L0X_POWERMODE_IDLE_LEVEL1
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_MODE_NOT_SUPPORTED This error occurs when PowerMode
- * is not in the supported list
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetPowerMode(VL53L0X_DEV Dev,
- VL53L0X_PowerModes PowerMode);
-
-/**
- * @brief Get the power mode for a given Device
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pPowerMode Pointer to the current value of the power
- * mode. see ::VL53L0X_PowerModes
- * Valid values are:
- * VL53L0X_POWERMODE_STANDBY_LEVEL1,
- * VL53L0X_POWERMODE_IDLE_LEVEL1
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetPowerMode(VL53L0X_DEV Dev,
- VL53L0X_PowerModes *pPowerMode);
-
-/**
- * Set or over-hide part to part calibration offset
- * \sa VL53L0X_DataInit() VL53L0X_GetOffsetCalibrationDataMicroMeter()
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param OffsetCalibrationDataMicroMeter Offset (microns)
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetOffsetCalibrationDataMicroMeter(
- VL53L0X_DEV Dev, int32_t OffsetCalibrationDataMicroMeter);
-
-/**
- * @brief Get part to part calibration offset
- *
- * @par Function Description
- * Should only be used after a successful call to @a VL53L0X_DataInit to backup
- * device NVM value
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pOffsetCalibrationDataMicroMeter Return part to part
- * calibration offset from device (microns)
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetOffsetCalibrationDataMicroMeter(
- VL53L0X_DEV Dev, int32_t *pOffsetCalibrationDataMicroMeter);
-
-/**
- * Set the linearity corrective gain
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param LinearityCorrectiveGain Linearity corrective
- * gain in x1000
- * if value is 1000 then no modification is applied.
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetLinearityCorrectiveGain(VL53L0X_DEV Dev,
- int16_t LinearityCorrectiveGain);
-
-/**
- * @brief Get the linearity corrective gain
- *
- * @par Function Description
- * Should only be used after a successful call to @a VL53L0X_DataInit to backup
- * device NVM value
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pLinearityCorrectiveGain Pointer to the linearity
- * corrective gain in x1000
- * if value is 1000 then no modification is applied.
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetLinearityCorrectiveGain(VL53L0X_DEV Dev,
- uint16_t *pLinearityCorrectiveGain);
-
-/**
- * Set Group parameter Hold state
- *
- * @par Function Description
- * Set or remove device internal group parameter hold
- *
- * @note This function is not Implemented
- *
- * @param Dev Device Handle
- * @param GroupParamHold Group parameter Hold state to be set (on/off)
- * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetGroupParamHold(VL53L0X_DEV Dev,
- uint8_t GroupParamHold);
-
-/**
- * @brief Get the maximal distance for actual setup
- * @par Function Description
- * Device must be initialized through @a VL53L0X_SetParameters() prior calling
- * this function.
- *
- * Any range value more than the value returned is to be considered as
- * "no target detected" or
- * "no target in detectable range"\n
- * @warning The maximal distance depends on the setup
- *
- * @note This function is not Implemented
- *
- * @param Dev Device Handle
- * @param pUpperLimitMilliMeter The maximal range limit for actual setup
- * (in millimeter)
- * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetUpperLimitMilliMeter(VL53L0X_DEV Dev,
- uint16_t *pUpperLimitMilliMeter);
-
-
-/**
- * @brief Get the Total Signal Rate
- * @par Function Description
- * This function will return the Total Signal Rate after a good ranging is done.
- *
- * @note This function access to Device
- *
- * @param Dev Device Handle
- * @param pTotalSignalRate Total Signal Rate value in Mega count per second
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_Error VL53L0X_GetTotalSignalRate(VL53L0X_DEV Dev,
- FixPoint1616_t *pTotalSignalRate);
-
-/** @} VL53L0X_general_group */
-
-/** @defgroup VL53L0X_init_group VL53L0X Init Functions
- * @brief VL53L0X Init Functions
- * @{
- */
-
-/**
- * @brief Set new device address
- *
- * After completion the device will answer to the new address programmed.
- * This function should be called when several devices are used in parallel
- * before start programming the sensor.
- * When a single device us used, there is no need to call this function.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param DeviceAddress The new Device address
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetDeviceAddress(VL53L0X_DEV Dev,
- uint8_t DeviceAddress);
-
-/**
- *
- * @brief One time device initialization
- *
- * To be called once and only once after device is brought out of reset
- * (Chip enable) and booted see @a VL53L0X_WaitDeviceBooted()
- *
- * @par Function Description
- * When not used after a fresh device "power up" or reset, it may return
- * @a #VL53L0X_ERROR_CALIBRATION_WARNING meaning wrong calibration data
- * may have been fetched from device that can result in ranging offset error\n
- * If application cannot execute device reset or need to run VL53L0X_DataInit
- * multiple time then it must ensure proper offset calibration saving and
- * restore on its own by using @a VL53L0X_GetOffsetCalibrationData() on first
- * power up and then @a VL53L0X_SetOffsetCalibrationData() in all subsequent init
- * This function will change the VL53L0X_State from VL53L0X_STATE_POWERDOWN to
- * VL53L0X_STATE_WAIT_STATICINIT.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_DataInit(VL53L0X_DEV Dev);
-
-/**
- * @brief Set the tuning settings pointer
- *
- * This function is used to specify the Tuning settings buffer to be used
- * for a given device. The buffer contains all the necessary data to permit
- * the API to write tuning settings.
- * This function permit to force the usage of either external or internal
- * tuning settings.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pTuningSettingBuffer Pointer to tuning settings buffer.
- * @param UseInternalTuningSettings Use internal tuning settings value.
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetTuningSettingBuffer(VL53L0X_DEV Dev,
- uint8_t *pTuningSettingBuffer, uint8_t UseInternalTuningSettings);
-
-/**
- * @brief Get the tuning settings pointer and the internal external switch
- * value.
- *
- * This function is used to get the Tuning settings buffer pointer and the
- * value.
- * of the switch to select either external or internal tuning settings.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param ppTuningSettingBuffer Pointer to tuning settings buffer.
- * @param pUseInternalTuningSettings Pointer to store Use internal tuning
- * settings value.
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetTuningSettingBuffer(VL53L0X_DEV Dev,
- uint8_t **ppTuningSettingBuffer, uint8_t *pUseInternalTuningSettings);
-
-/**
- * @brief Do basic device init (and eventually patch loading)
- * This function will change the VL53L0X_State from
- * VL53L0X_STATE_WAIT_STATICINIT to VL53L0X_STATE_IDLE.
- * In this stage all default setting will be applied.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_StaticInit(VL53L0X_DEV Dev);
-
-/**
- * @brief Wait for device booted after chip enable (hardware standby)
- * This function can be run only when VL53L0X_State is VL53L0X_STATE_POWERDOWN.
- *
- * @note This function is not Implemented
- *
- * @param Dev Device Handle
- * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented
- *
- */
-VL53L0X_API VL53L0X_Error VL53L0X_WaitDeviceBooted(VL53L0X_DEV Dev);
-
-/**
- * @brief Do an hard reset or soft reset (depending on implementation) of the
- * device \nAfter call of this function, device must be in same state as right
- * after a power-up sequence.This function will change the VL53L0X_State to
- * VL53L0X_STATE_POWERDOWN.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_ResetDevice(VL53L0X_DEV Dev);
-
-/** @} VL53L0X_init_group */
-
-/** @defgroup VL53L0X_parameters_group VL53L0X Parameters Functions
- * @brief Functions used to prepare and setup the device
- * @{
- */
-
-/**
- * @brief Prepare device for operation
- * @par Function Description
- * Update device with provided parameters
- * @li Then start ranging operation.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pDeviceParameters Pointer to store current device parameters.
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetDeviceParameters(VL53L0X_DEV Dev,
- const VL53L0X_DeviceParameters_t *pDeviceParameters);
-
-/**
- * @brief Retrieve current device parameters
- * @par Function Description
- * Get actual parameters of the device
- * @li Then start ranging operation.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pDeviceParameters Pointer to store current device parameters.
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetDeviceParameters(VL53L0X_DEV Dev,
- VL53L0X_DeviceParameters_t *pDeviceParameters);
-
-/**
- * @brief Set a new device mode
- * @par Function Description
- * Set device to a new mode (ranging, histogram ...)
- *
- * @note This function doesn't Access to the device
- *
- * @param Dev Device Handle
- * @param DeviceMode New device mode to apply
- * Valid values are:
- * VL53L0X_DEVICEMODE_SINGLE_RANGING
- * VL53L0X_DEVICEMODE_CONTINUOUS_RANGING
- * VL53L0X_DEVICEMODE_CONTINUOUS_TIMED_RANGING
- * VL53L0X_DEVICEMODE_SINGLE_HISTOGRAM
- * VL53L0X_HISTOGRAMMODE_REFERENCE_ONLY
- * VL53L0X_HISTOGRAMMODE_RETURN_ONLY
- * VL53L0X_HISTOGRAMMODE_BOTH
- *
- *
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_MODE_NOT_SUPPORTED This error occurs when DeviceMode is
- * not in the supported list
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetDeviceMode(VL53L0X_DEV Dev,
- VL53L0X_DeviceModes DeviceMode);
-
-/**
- * @brief Get current new device mode
- * @par Function Description
- * Get actual mode of the device(ranging, histogram ...)
- *
- * @note This function doesn't Access to the device
- *
- * @param Dev Device Handle
- * @param pDeviceMode Pointer to current apply mode value
- * Valid values are:
- * VL53L0X_DEVICEMODE_SINGLE_RANGING
- * VL53L0X_DEVICEMODE_CONTINUOUS_RANGING
- * VL53L0X_DEVICEMODE_CONTINUOUS_TIMED_RANGING
- * VL53L0X_DEVICEMODE_SINGLE_HISTOGRAM
- * VL53L0X_HISTOGRAMMODE_REFERENCE_ONLY
- * VL53L0X_HISTOGRAMMODE_RETURN_ONLY
- * VL53L0X_HISTOGRAMMODE_BOTH
- *
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_MODE_NOT_SUPPORTED This error occurs when
- * DeviceMode is not in the supported list
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetDeviceMode(VL53L0X_DEV Dev,
- VL53L0X_DeviceModes *pDeviceMode);
-
-/**
- * @brief Sets the resolution of range measurements.
- * @par Function Description
- * Set resolution of range measurements to either 0.25mm if
- * fraction enabled or 1mm if not enabled.
- *
- * @note This function Accesses the device
- *
- * @param Dev Device Handle
- * @param Enable Enable high resolution
- *
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetRangeFractionEnable(VL53L0X_DEV Dev,
- uint8_t Enable);
-
-/**
- * @brief Gets the fraction enable parameter indicating the resolution of
- * range measurements.
- *
- * @par Function Description
- * Gets the fraction enable state, which translates to the resolution of
- * range measurements as follows :Enabled:=0.25mm resolution,
- * Not Enabled:=1mm resolution.
- *
- * @note This function Accesses the device
- *
- * @param Dev Device Handle
- * @param pEnable Output Parameter reporting the fraction enable state.
- *
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetFractionEnable(VL53L0X_DEV Dev,
- uint8_t *pEnable);
-
-/**
- * @brief Set a new Histogram mode
- * @par Function Description
- * Set device to a new Histogram mode
- *
- * @note This function doesn't Access to the device
- *
- * @param Dev Device Handle
- * @param HistogramMode New device mode to apply
- * Valid values are:
- * VL53L0X_HISTOGRAMMODE_DISABLED
- * VL53L0X_DEVICEMODE_SINGLE_HISTOGRAM
- * VL53L0X_HISTOGRAMMODE_REFERENCE_ONLY
- * VL53L0X_HISTOGRAMMODE_RETURN_ONLY
- * VL53L0X_HISTOGRAMMODE_BOTH
- *
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_MODE_NOT_SUPPORTED This error occurs when
- * HistogramMode is not in the supported list
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetHistogramMode(VL53L0X_DEV Dev,
- VL53L0X_HistogramModes HistogramMode);
-
-/**
- * @brief Get current new device mode
- * @par Function Description
- * Get current Histogram mode of a Device
- *
- * @note This function doesn't Access to the device
- *
- * @param Dev Device Handle
- * @param pHistogramMode Pointer to current Histogram Mode value
- * Valid values are:
- * VL53L0X_HISTOGRAMMODE_DISABLED
- * VL53L0X_DEVICEMODE_SINGLE_HISTOGRAM
- * VL53L0X_HISTOGRAMMODE_REFERENCE_ONLY
- * VL53L0X_HISTOGRAMMODE_RETURN_ONLY
- * VL53L0X_HISTOGRAMMODE_BOTH
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetHistogramMode(VL53L0X_DEV Dev,
- VL53L0X_HistogramModes *pHistogramMode);
-
-/**
- * @brief Set Ranging Timing Budget in microseconds
- *
- * @par Function Description
- * Defines the maximum time allowed by the user to the device to run a
- * full ranging sequence for the current mode (ranging, histogram, ASL ...)
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param MeasurementTimingBudgetMicroSeconds Max measurement time in
- * microseconds.
- * Valid values are:
- * >= 17000 microsecs when wraparound enabled
- * >= 12000 microsecs when wraparound disabled
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_INVALID_PARAMS This error is returned if
- MeasurementTimingBudgetMicroSeconds out of range
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetMeasurementTimingBudgetMicroSeconds(
- VL53L0X_DEV Dev, uint32_t MeasurementTimingBudgetMicroSeconds);
-
-/**
- * @brief Get Ranging Timing Budget in microseconds
- *
- * @par Function Description
- * Returns the programmed the maximum time allowed by the user to the
- * device to run a full ranging sequence for the current mode
- * (ranging, histogram, ASL ...)
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pMeasurementTimingBudgetMicroSeconds Max measurement time in
- * microseconds.
- * Valid values are:
- * >= 17000 microsecs when wraparound enabled
- * >= 12000 microsecs when wraparound disabled
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetMeasurementTimingBudgetMicroSeconds(
- VL53L0X_DEV Dev, uint32_t *pMeasurementTimingBudgetMicroSeconds);
-
-/**
- * @brief Gets the VCSEL pulse period.
- *
- * @par Function Description
- * This function retrieves the VCSEL pulse period for the given period type.
- *
- * @note This function Accesses the device
- *
- * @param Dev Device Handle
- * @param VcselPeriodType VCSEL period identifier (pre-range|final).
- * @param pVCSELPulsePeriod Pointer to VCSEL period value.
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_INVALID_PARAMS Error VcselPeriodType parameter not
- * supported.
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetVcselPulsePeriod(VL53L0X_DEV Dev,
- VL53L0X_VcselPeriod VcselPeriodType, uint8_t *pVCSELPulsePeriod);
-
-/**
- * @brief Sets the VCSEL pulse period.
- *
- * @par Function Description
- * This function retrieves the VCSEL pulse period for the given period type.
- *
- * @note This function Accesses the device
- *
- * @param Dev Device Handle
- * @param VcselPeriodType VCSEL period identifier (pre-range|final).
- * @param VCSELPulsePeriod VCSEL period value
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_INVALID_PARAMS Error VcselPeriodType parameter not
- * supported.
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetVcselPulsePeriod(VL53L0X_DEV Dev,
- VL53L0X_VcselPeriod VcselPeriodType, uint8_t VCSELPulsePeriod);
-
-/**
- * @brief Sets the (on/off) state of a requested sequence step.
- *
- * @par Function Description
- * This function enables/disables a requested sequence step.
- *
- * @note This function Accesses the device
- *
- * @param Dev Device Handle
- * @param SequenceStepId Sequence step identifier.
- * @param SequenceStepEnabled Demanded state {0=Off,1=On}
- * is enabled.
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_INVALID_PARAMS Error SequenceStepId parameter not
- * supported.
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetSequenceStepEnable(VL53L0X_DEV Dev,
- VL53L0X_SequenceStepId SequenceStepId, uint8_t SequenceStepEnabled);
-
-/**
- * @brief Gets the (on/off) state of a requested sequence step.
- *
- * @par Function Description
- * This function retrieves the state of a requested sequence step, i.e. on/off.
- *
- * @note This function Accesses the device
- *
- * @param Dev Device Handle
- * @param SequenceStepId Sequence step identifier.
- * @param pSequenceStepEnabled Out parameter reporting if the sequence step
- * is enabled {0=Off,1=On}.
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_INVALID_PARAMS Error SequenceStepId parameter not
- * supported.
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetSequenceStepEnable(VL53L0X_DEV Dev,
- VL53L0X_SequenceStepId SequenceStepId, uint8_t *pSequenceStepEnabled);
-
-/**
- * @brief Gets the (on/off) state of all sequence steps.
- *
- * @par Function Description
- * This function retrieves the state of all sequence step in the scheduler.
- *
- * @note This function Accesses the device
- *
- * @param Dev Device Handle
- * @param pSchedulerSequenceSteps Pointer to struct containing result.
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetSequenceStepEnables(VL53L0X_DEV Dev,
- VL53L0X_SchedulerSequenceSteps_t *pSchedulerSequenceSteps);
-
-/**
- * @brief Sets the timeout of a requested sequence step.
- *
- * @par Function Description
- * This function sets the timeout of a requested sequence step.
- *
- * @note This function Accesses the device
- *
- * @param Dev Device Handle
- * @param SequenceStepId Sequence step identifier.
- * @param TimeOutMilliSecs Demanded timeout
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_INVALID_PARAMS Error SequenceStepId parameter not
- * supported.
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetSequenceStepTimeout(VL53L0X_DEV Dev,
- VL53L0X_SequenceStepId SequenceStepId, FixPoint1616_t TimeOutMilliSecs);
-
-/**
- * @brief Gets the timeout of a requested sequence step.
- *
- * @par Function Description
- * This function retrieves the timeout of a requested sequence step.
- *
- * @note This function Accesses the device
- *
- * @param Dev Device Handle
- * @param SequenceStepId Sequence step identifier.
- * @param pTimeOutMilliSecs Timeout value.
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_INVALID_PARAMS Error SequenceStepId parameter not
- * supported.
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetSequenceStepTimeout(VL53L0X_DEV Dev,
- VL53L0X_SequenceStepId SequenceStepId,
- FixPoint1616_t *pTimeOutMilliSecs);
-
-/**
- * @brief Gets number of sequence steps managed by the API.
- *
- * @par Function Description
- * This function retrieves the number of sequence steps currently managed
- * by the API
- *
- * @note This function Accesses the device
- *
- * @param Dev Device Handle
- * @param pNumberOfSequenceSteps Out parameter reporting the number of
- * sequence steps.
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetNumberOfSequenceSteps(VL53L0X_DEV Dev,
- uint8_t *pNumberOfSequenceSteps);
-
-/**
- * @brief Gets the name of a given sequence step.
- *
- * @par Function Description
- * This function retrieves the name of sequence steps corresponding to
- * SequenceStepId.
- *
- * @note This function doesn't Accesses the device
- *
- * @param SequenceStepId Sequence step identifier.
- * @param pSequenceStepsString Pointer to Info string
- *
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetSequenceStepsInfo(
- VL53L0X_SequenceStepId SequenceStepId, char *pSequenceStepsString);
-
-/**
- * Program continuous mode Inter-Measurement period in milliseconds
- *
- * @par Function Description
- * When trying to set too short time return INVALID_PARAMS minimal value
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param InterMeasurementPeriodMilliSeconds Inter-Measurement Period in ms.
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetInterMeasurementPeriodMilliSeconds(
- VL53L0X_DEV Dev, uint32_t InterMeasurementPeriodMilliSeconds);
-
-/**
- * Get continuous mode Inter-Measurement period in milliseconds
- *
- * @par Function Description
- * When trying to set too short time return INVALID_PARAMS minimal value
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pInterMeasurementPeriodMilliSeconds Pointer to programmed
- * Inter-Measurement Period in milliseconds.
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetInterMeasurementPeriodMilliSeconds(
- VL53L0X_DEV Dev, uint32_t *pInterMeasurementPeriodMilliSeconds);
-
-/**
- * @brief Enable/Disable Cross talk compensation feature
- *
- * @note This function is not Implemented.
- * Enable/Disable Cross Talk by set to zero the Cross Talk value
- * by using @a VL53L0X_SetXTalkCompensationRateMegaCps().
- *
- * @param Dev Device Handle
- * @param XTalkCompensationEnable Cross talk compensation
- * to be set 0=disabled else = enabled
- * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetXTalkCompensationEnable(VL53L0X_DEV Dev,
- uint8_t XTalkCompensationEnable);
-
-/**
- * @brief Get Cross talk compensation rate
- *
- * @note This function is not Implemented.
- * Enable/Disable Cross Talk by set to zero the Cross Talk value by
- * using @a VL53L0X_SetXTalkCompensationRateMegaCps().
- *
- * @param Dev Device Handle
- * @param pXTalkCompensationEnable Pointer to the Cross talk compensation
- * state 0=disabled or 1 = enabled
- * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetXTalkCompensationEnable(VL53L0X_DEV Dev,
- uint8_t *pXTalkCompensationEnable);
-
-/**
- * @brief Set Cross talk compensation rate
- *
- * @par Function Description
- * Set Cross talk compensation rate.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param XTalkCompensationRateMegaCps Compensation rate in
- * Mega counts per second (16.16 fix point) see datasheet for details
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetXTalkCompensationRateMegaCps(VL53L0X_DEV Dev,
- FixPoint1616_t XTalkCompensationRateMegaCps);
-
-/**
- * @brief Get Cross talk compensation rate
- *
- * @par Function Description
- * Get Cross talk compensation rate.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pXTalkCompensationRateMegaCps Pointer to Compensation rate
- in Mega counts per second (16.16 fix point) see datasheet for details
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetXTalkCompensationRateMegaCps(VL53L0X_DEV Dev,
- FixPoint1616_t *pXTalkCompensationRateMegaCps);
-
-/**
- * @brief Set Reference Calibration Parameters
- *
- * @par Function Description
- * Set Reference Calibration Parameters.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param VhvSettings Parameter for VHV
- * @param PhaseCal Parameter for PhaseCal
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetRefCalibration(VL53L0X_DEV Dev,
- uint8_t VhvSettings, uint8_t PhaseCal);
-
-/**
- * @brief Get Reference Calibration Parameters
- *
- * @par Function Description
- * Get Reference Calibration Parameters.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pVhvSettings Pointer to VHV parameter
- * @param pPhaseCal Pointer to PhaseCal Parameter
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetRefCalibration(VL53L0X_DEV Dev,
- uint8_t *pVhvSettings, uint8_t *pPhaseCal);
-
-/**
- * @brief Get the number of the check limit managed by a given Device
- *
- * @par Function Description
- * This function give the number of the check limit managed by the Device
- *
- * @note This function doesn't Access to the device
- *
- * @param pNumberOfLimitCheck Pointer to the number of check limit.
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetNumberOfLimitCheck(
- uint16_t *pNumberOfLimitCheck);
-
-/**
- * @brief Return a description string for a given limit check number
- *
- * @par Function Description
- * This function returns a description string for a given limit check number.
- * The limit check is identified with the LimitCheckId.
- *
- * @note This function doesn't Access to the device
- *
- * @param Dev Device Handle
- * @param LimitCheckId Limit Check ID
- (0<= LimitCheckId < VL53L0X_GetNumberOfLimitCheck() ).
- * @param pLimitCheckString Pointer to the
- description string of the given check limit.
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_INVALID_PARAMS This error is
- returned when LimitCheckId value is out of range.
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetLimitCheckInfo(VL53L0X_DEV Dev,
- uint16_t LimitCheckId, char *pLimitCheckString);
-
-/**
- * @brief Return a the Status of the specified check limit
- *
- * @par Function Description
- * This function returns the Status of the specified check limit.
- * The value indicate if the check is fail or not.
- * The limit check is identified with the LimitCheckId.
- *
- * @note This function doesn't Access to the device
- *
- * @param Dev Device Handle
- * @param LimitCheckId Limit Check ID
- (0<= LimitCheckId < VL53L0X_GetNumberOfLimitCheck() ).
- * @param pLimitCheckStatus Pointer to the
- Limit Check Status of the given check limit.
- * LimitCheckStatus :
- * 0 the check is not fail
- * 1 the check if fail or not enabled
- *
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_INVALID_PARAMS This error is
- returned when LimitCheckId value is out of range.
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetLimitCheckStatus(VL53L0X_DEV Dev,
- uint16_t LimitCheckId, uint8_t *pLimitCheckStatus);
-
-/**
- * @brief Enable/Disable a specific limit check
- *
- * @par Function Description
- * This function Enable/Disable a specific limit check.
- * The limit check is identified with the LimitCheckId.
- *
- * @note This function doesn't Access to the device
- *
- * @param Dev Device Handle
- * @param LimitCheckId Limit Check ID
- * (0<= LimitCheckId < VL53L0X_GetNumberOfLimitCheck() ).
- * @param LimitCheckEnable if 1 the check limit
- * corresponding to LimitCheckId is Enabled
- * if 0 the check limit
- * corresponding to LimitCheckId is disabled
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_INVALID_PARAMS This error is returned
- * when LimitCheckId value is out of range.
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetLimitCheckEnable(VL53L0X_DEV Dev,
- uint16_t LimitCheckId, uint8_t LimitCheckEnable);
-
-/**
- * @brief Get specific limit check enable state
- *
- * @par Function Description
- * This function get the enable state of a specific limit check.
- * The limit check is identified with the LimitCheckId.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param LimitCheckId Limit Check ID
- * (0<= LimitCheckId < VL53L0X_GetNumberOfLimitCheck() ).
- * @param pLimitCheckEnable Pointer to the check limit enable
- * value.
- * if 1 the check limit
- * corresponding to LimitCheckId is Enabled
- * if 0 the check limit
- * corresponding to LimitCheckId is disabled
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_INVALID_PARAMS This error is returned
- * when LimitCheckId value is out of range.
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetLimitCheckEnable(VL53L0X_DEV Dev,
- uint16_t LimitCheckId, uint8_t *pLimitCheckEnable);
-
-/**
- * @brief Set a specific limit check value
- *
- * @par Function Description
- * This function set a specific limit check value.
- * The limit check is identified with the LimitCheckId.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param LimitCheckId Limit Check ID
- * (0<= LimitCheckId < VL53L0X_GetNumberOfLimitCheck() ).
- * @param LimitCheckValue Limit check Value for a given
- * LimitCheckId
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_INVALID_PARAMS This error is returned when either
- * LimitCheckId or LimitCheckValue value is out of range.
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetLimitCheckValue(VL53L0X_DEV Dev,
- uint16_t LimitCheckId, FixPoint1616_t LimitCheckValue);
-
-/**
- * @brief Get a specific limit check value
- *
- * @par Function Description
- * This function get a specific limit check value from device then it updates
- * internal values and check enables.
- * The limit check is identified with the LimitCheckId.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param LimitCheckId Limit Check ID
- * (0<= LimitCheckId < VL53L0X_GetNumberOfLimitCheck() ).
- * @param pLimitCheckValue Pointer to Limit
- * check Value for a given LimitCheckId.
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_INVALID_PARAMS This error is returned
- * when LimitCheckId value is out of range.
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetLimitCheckValue(VL53L0X_DEV Dev,
- uint16_t LimitCheckId, FixPoint1616_t *pLimitCheckValue);
-
-/**
- * @brief Get the current value of the signal used for the limit check
- *
- * @par Function Description
- * This function get a the current value of the signal used for the limit check.
- * To obtain the latest value you should run a ranging before.
- * The value reported is linked to the limit check identified with the
- * LimitCheckId.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param LimitCheckId Limit Check ID
- * (0<= LimitCheckId < VL53L0X_GetNumberOfLimitCheck() ).
- * @param pLimitCheckCurrent Pointer to current Value for a
- * given LimitCheckId.
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_INVALID_PARAMS This error is returned when
- * LimitCheckId value is out of range.
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetLimitCheckCurrent(VL53L0X_DEV Dev,
- uint16_t LimitCheckId, FixPoint1616_t *pLimitCheckCurrent);
-
-/**
- * @brief Enable (or disable) Wrap around Check
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param WrapAroundCheckEnable Wrap around Check to be set
- * 0=disabled, other = enabled
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetWrapAroundCheckEnable(VL53L0X_DEV Dev,
- uint8_t WrapAroundCheckEnable);
-
-/**
- * @brief Get setup of Wrap around Check
- *
- * @par Function Description
- * This function get the wrapAround check enable parameters
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pWrapAroundCheckEnable Pointer to the Wrap around Check state
- * 0=disabled or 1 = enabled
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetWrapAroundCheckEnable(VL53L0X_DEV Dev,
- uint8_t *pWrapAroundCheckEnable);
-
-/**
- * @brief Set Dmax Calibration Parameters for a given device
- * When one of the parameter is zero, this function will get parameter
- * from NVM.
- * @note This function doesn't Access to the device
- *
- * @param Dev Device Handle
- * @param RangeMilliMeter Calibration Distance
- * @param SignalRateRtnMegaCps Signal rate return read at CalDistance
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetDmaxCalParameters(VL53L0X_DEV Dev,
- uint16_t RangeMilliMeter, FixPoint1616_t SignalRateRtnMegaCps);
-
-/**
- * @brief Get Dmax Calibration Parameters for a given device
- *
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pRangeMilliMeter Pointer to Calibration Distance
- * @param pSignalRateRtnMegaCps Pointer to Signal rate return
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetDmaxCalParameters(VL53L0X_DEV Dev,
- uint16_t *pRangeMilliMeter, FixPoint1616_t *pSignalRateRtnMegaCps);
-
-/** @} VL53L0X_parameters_group */
-
-/** @defgroup VL53L0X_measurement_group VL53L0X Measurement Functions
- * @brief Functions used for the measurements
- * @{
- */
-
-/**
- * @brief Single shot measurement.
- *
- * @par Function Description
- * Perform simple measurement sequence (Start measure, Wait measure to end,
- * and returns when measurement is done).
- * Once function returns, user can get valid data by calling
- * VL53L0X_GetRangingMeasurement or VL53L0X_GetHistogramMeasurement
- * depending on defined measurement mode
- * User should Clear the interrupt in case this are enabled by using the
- * function VL53L0X_ClearInterruptMask().
- *
- * @warning This function is a blocking function
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_PerformSingleMeasurement(VL53L0X_DEV Dev);
-
-/**
- * @brief Perform Reference Calibration
- *
- * @details Perform a reference calibration of the Device.
- * This function should be run from time to time before doing
- * a ranging measurement.
- * This function will launch a special ranging measurement, so
- * if interrupt are enable an interrupt will be done.
- * This function will clear the interrupt generated automatically.
- *
- * @warning This function is a blocking function
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pVhvSettings Pointer to vhv settings parameter.
- * @param pPhaseCal Pointer to PhaseCal parameter.
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_PerformRefCalibration(VL53L0X_DEV Dev,
- uint8_t *pVhvSettings, uint8_t *pPhaseCal);
-
-/**
- * @brief Perform XTalk Measurement
- *
- * @details Measures the current cross talk from glass in front
- * of the sensor.
- * This functions performs a histogram measurement and uses the results
- * to measure the crosstalk. For the function to be successful, there
- * must be no target in front of the sensor.
- *
- * @warning This function is a blocking function
- *
- * @warning This function is not supported when the final range
- * vcsel clock period is set below 10 PCLKS.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param TimeoutMs Histogram measurement duration.
- * @param pXtalkPerSpad Output parameter containing the crosstalk
- * measurement result, in MCPS/Spad. Format fixpoint 16:16.
- * @param pAmbientTooHigh Output parameter which indicate that
- * pXtalkPerSpad is not good if the Ambient is too high.
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_INVALID_PARAMS vcsel clock period not supported
- * for this operation. Must not be less than 10PCLKS.
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_PerformXTalkMeasurement(VL53L0X_DEV Dev,
- uint32_t TimeoutMs, FixPoint1616_t *pXtalkPerSpad,
- uint8_t *pAmbientTooHigh);
-
-/**
- * @brief Perform XTalk Calibration
- *
- * @details Perform a XTalk calibration of the Device.
- * This function will launch a ranging measurement, if interrupts
- * are enabled an interrupt will be done.
- * This function will clear the interrupt generated automatically.
- * This function will program a new value for the XTalk compensation
- * and it will enable the cross talk before exit.
- * This function will disable the VL53L0X_CHECKENABLE_RANGE_IGNORE_THRESHOLD.
- *
- * @warning This function is a blocking function
- *
- * @note This function Access to the device
- *
- * @note This function change the device mode to
- * VL53L0X_DEVICEMODE_SINGLE_RANGING
- *
- * @param Dev Device Handle
- * @param XTalkCalDistance XTalkCalDistance value used for the XTalk
- * computation.
- * @param pXTalkCompensationRateMegaCps Pointer to new
- * XTalkCompensation value.
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_PerformXTalkCalibration(VL53L0X_DEV Dev,
- FixPoint1616_t XTalkCalDistance,
- FixPoint1616_t *pXTalkCompensationRateMegaCps);
-
-/**
- * @brief Perform Offset Calibration
- *
- * @details Perform a Offset calibration of the Device.
- * This function will launch a ranging measurement, if interrupts are
- * enabled an interrupt will be done.
- * This function will clear the interrupt generated automatically.
- * This function will program a new value for the Offset calibration value
- * This function will disable the VL53L0X_CHECKENABLE_RANGE_IGNORE_THRESHOLD.
- *
- * @warning This function is a blocking function
- *
- * @note This function Access to the device
- *
- * @note This function does not change the device mode.
- *
- * @param Dev Device Handle
- * @param CalDistanceMilliMeter Calibration distance value used for the
- * offset compensation.
- * @param pOffsetMicroMeter Pointer to new Offset value computed by the
- * function.
- *
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_PerformOffsetCalibration(VL53L0X_DEV Dev,
- FixPoint1616_t CalDistanceMilliMeter, int32_t *pOffsetMicroMeter);
-
-/**
- * @brief Start device measurement
- *
- * @details Started measurement will depend on device parameters set through
- * @a VL53L0X_SetParameters()
- * This is a non-blocking function.
- * This function will change the VL53L0X_State from VL53L0X_STATE_IDLE to
- * VL53L0X_STATE_RUNNING.
- *
- * @note This function Access to the device
- *
-
- * @param Dev Device Handle
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_MODE_NOT_SUPPORTED This error occurs when
- * DeviceMode programmed with @a VL53L0X_SetDeviceMode is not in the supported
- * list:
- * Supported mode are:
- * VL53L0X_DEVICEMODE_SINGLE_RANGING,
- * VL53L0X_DEVICEMODE_CONTINUOUS_RANGING,
- * VL53L0X_DEVICEMODE_CONTINUOUS_TIMED_RANGING
- * @return VL53L0X_ERROR_TIME_OUT Time out on start measurement
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_StartMeasurement(VL53L0X_DEV Dev);
-
-/**
- * @brief Stop device measurement
- *
- * @details Will set the device in standby mode at end of current measurement\n
- * Not necessary in single mode as device shall return automatically
- * in standby mode at end of measurement.
- * This function will change the VL53L0X_State from VL53L0X_STATE_RUNNING
- * to VL53L0X_STATE_IDLE.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_StopMeasurement(VL53L0X_DEV Dev);
-
-/**
- * @brief Return Measurement Data Ready
- *
- * @par Function Description
- * This function indicate that a measurement data is ready.
- * This function check if interrupt mode is used then check is done accordingly.
- * If perform function clear the interrupt, this function will not work,
- * like in case of @a VL53L0X_PerformSingleRangingMeasurement().
- * The previous function is blocking function, VL53L0X_GetMeasurementDataReady
- * is used for non-blocking capture.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pMeasurementDataReady Pointer to Measurement Data Ready.
- * 0=data not ready, 1 = data ready
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetMeasurementDataReady(VL53L0X_DEV Dev,
- uint8_t *pMeasurementDataReady);
-
-/**
- * @brief Wait for device ready for a new measurement command.
- * Blocking function.
- *
- * @note This function is not Implemented
- *
- * @param Dev Device Handle
- * @param MaxLoop Max Number of polling loop (timeout).
- * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented
- */
-VL53L0X_API VL53L0X_Error VL53L0X_WaitDeviceReadyForNewMeasurement(VL53L0X_DEV Dev,
- uint32_t MaxLoop);
-
-/**
- * @brief Retrieve the Reference Signal after a measurements
- *
- * @par Function Description
- * Get Reference Signal from last successful Ranging measurement
- * This function return a valid value after that you call the
- * @a VL53L0X_GetRangingMeasurementData().
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pMeasurementRefSignal Pointer to the Ref Signal to fill up.
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetMeasurementRefSignal(VL53L0X_DEV Dev,
- FixPoint1616_t *pMeasurementRefSignal);
-
-/**
- * @brief Retrieve the measurements from device for a given setup
- *
- * @par Function Description
- * Get data from last successful Ranging measurement
- * @warning USER should take care about @a VL53L0X_GetNumberOfROIZones()
- * before get data.
- * PAL will fill a NumberOfROIZones times the corresponding data
- * structure used in the measurement function.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pRangingMeasurementData Pointer to the data structure to fill up.
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetRangingMeasurementData(VL53L0X_DEV Dev,
- VL53L0X_RangingMeasurementData_t *pRangingMeasurementData);
-
-/**
- * @brief Retrieve the measurements from device for a given setup
- *
- * @par Function Description
- * Get data from last successful Histogram measurement
- * @warning USER should take care about @a VL53L0X_GetNumberOfROIZones()
- * before get data.
- * PAL will fill a NumberOfROIZones times the corresponding data structure
- * used in the measurement function.
- *
- * @note This function is not Implemented
- *
- * @param Dev Device Handle
- * @param pHistogramMeasurementData Pointer to the histogram data structure.
- * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetHistogramMeasurementData(VL53L0X_DEV Dev,
- VL53L0X_HistogramMeasurementData_t *pHistogramMeasurementData);
-
-/**
- * @brief Performs a single ranging measurement and retrieve the ranging
- * measurement data
- *
- * @par Function Description
- * This function will change the device mode to VL53L0X_DEVICEMODE_SINGLE_RANGING
- * with @a VL53L0X_SetDeviceMode(),
- * It performs measurement with @a VL53L0X_PerformSingleMeasurement()
- * It get data from last successful Ranging measurement with
- * @a VL53L0X_GetRangingMeasurementData.
- * Finally it clear the interrupt with @a VL53L0X_ClearInterruptMask().
- *
- * @note This function Access to the device
- *
- * @note This function change the device mode to
- * VL53L0X_DEVICEMODE_SINGLE_RANGING
- *
- * @param Dev Device Handle
- * @param pRangingMeasurementData Pointer to the data structure to fill up.
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_PerformSingleRangingMeasurement(VL53L0X_DEV Dev,
- VL53L0X_RangingMeasurementData_t *pRangingMeasurementData);
-
-/**
- * @brief Performs a single histogram measurement and retrieve the histogram
- * measurement data
- * Is equivalent to VL53L0X_PerformSingleMeasurement +
- * VL53L0X_GetHistogramMeasurementData
- *
- * @par Function Description
- * Get data from last successful Ranging measurement.
- * This function will clear the interrupt in case of these are enabled.
- *
- * @note This function is not Implemented
- *
- * @param Dev Device Handle
- * @param pHistogramMeasurementData Pointer to the data structure to fill up.
- * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented
- */
-VL53L0X_API VL53L0X_Error VL53L0X_PerformSingleHistogramMeasurement(VL53L0X_DEV Dev,
- VL53L0X_HistogramMeasurementData_t *pHistogramMeasurementData);
-
-/**
- * @brief Set the number of ROI Zones to be used for a specific Device
- *
- * @par Function Description
- * Set the number of ROI Zones to be used for a specific Device.
- * The programmed value should be less than the max number of ROI Zones given
- * with @a VL53L0X_GetMaxNumberOfROIZones().
- * This version of API manage only one zone.
- *
- * @param Dev Device Handle
- * @param NumberOfROIZones Number of ROI Zones to be used for a
- * specific Device.
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_INVALID_PARAMS This error is returned if
- * NumberOfROIZones != 1
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetNumberOfROIZones(VL53L0X_DEV Dev,
- uint8_t NumberOfROIZones);
-
-/**
- * @brief Get the number of ROI Zones managed by the Device
- *
- * @par Function Description
- * Get number of ROI Zones managed by the Device
- * USER should take care about @a VL53L0X_GetNumberOfROIZones()
- * before get data after a perform measurement.
- * PAL will fill a NumberOfROIZones times the corresponding data
- * structure used in the measurement function.
- *
- * @note This function doesn't Access to the device
- *
- * @param Dev Device Handle
- * @param pNumberOfROIZones Pointer to the Number of ROI Zones value.
- * @return VL53L0X_ERROR_NONE Success
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetNumberOfROIZones(VL53L0X_DEV Dev,
- uint8_t *pNumberOfROIZones);
-
-/**
- * @brief Get the Maximum number of ROI Zones managed by the Device
- *
- * @par Function Description
- * Get Maximum number of ROI Zones managed by the Device.
- *
- * @note This function doesn't Access to the device
- *
- * @param Dev Device Handle
- * @param pMaxNumberOfROIZones Pointer to the Maximum Number
- * of ROI Zones value.
- * @return VL53L0X_ERROR_NONE Success
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetMaxNumberOfROIZones(VL53L0X_DEV Dev,
- uint8_t *pMaxNumberOfROIZones);
-
-/** @} VL53L0X_measurement_group */
-
-/** @defgroup VL53L0X_interrupt_group VL53L0X Interrupt Functions
- * @brief Functions used for interrupt managements
- * @{
- */
-
-/**
- * @brief Set the configuration of GPIO pin for a given device
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param Pin ID of the GPIO Pin
- * @param Functionality Select Pin functionality.
- * Refer to ::VL53L0X_GpioFunctionality
- * @param DeviceMode Device Mode associated to the Gpio.
- * @param Polarity Set interrupt polarity. Active high
- * or active low see ::VL53L0X_InterruptPolarity
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_GPIO_NOT_EXISTING Only Pin=0 is accepted.
- * @return VL53L0X_ERROR_GPIO_FUNCTIONALITY_NOT_SUPPORTED This error occurs
- * when Functionality programmed is not in the supported list:
- * Supported value are:
- * VL53L0X_GPIOFUNCTIONALITY_OFF,
- * VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_LOW,
- * VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_HIGH,
- VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_OUT,
- * VL53L0X_GPIOFUNCTIONALITY_NEW_MEASURE_READY
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetGpioConfig(VL53L0X_DEV Dev, uint8_t Pin,
- VL53L0X_DeviceModes DeviceMode, VL53L0X_GpioFunctionality Functionality,
- VL53L0X_InterruptPolarity Polarity);
-
-/**
- * @brief Get current configuration for GPIO pin for a given device
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param Pin ID of the GPIO Pin
- * @param pDeviceMode Pointer to Device Mode associated to the Gpio.
- * @param pFunctionality Pointer to Pin functionality.
- * Refer to ::VL53L0X_GpioFunctionality
- * @param pPolarity Pointer to interrupt polarity.
- * Active high or active low see ::VL53L0X_InterruptPolarity
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_GPIO_NOT_EXISTING Only Pin=0 is accepted.
- * @return VL53L0X_ERROR_GPIO_FUNCTIONALITY_NOT_SUPPORTED This error occurs
- * when Functionality programmed is not in the supported list:
- * Supported value are:
- * VL53L0X_GPIOFUNCTIONALITY_OFF,
- * VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_LOW,
- * VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_HIGH,
- * VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_OUT,
- * VL53L0X_GPIOFUNCTIONALITY_NEW_MEASURE_READY
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetGpioConfig(VL53L0X_DEV Dev, uint8_t Pin,
- VL53L0X_DeviceModes *pDeviceMode,
- VL53L0X_GpioFunctionality *pFunctionality,
- VL53L0X_InterruptPolarity *pPolarity);
-
-/**
- * @brief Set low and high Interrupt thresholds for a given mode
- * (ranging, ALS, ...) for a given device
- *
- * @par Function Description
- * Set low and high Interrupt thresholds for a given mode (ranging, ALS, ...)
- * for a given device
- *
- * @note This function Access to the device
- *
- * @note DeviceMode is ignored for the current device
- *
- * @param Dev Device Handle
- * @param DeviceMode Device Mode for which change thresholds
- * @param ThresholdLow Low threshold (mm, lux ..., depending on the mode)
- * @param ThresholdHigh High threshold (mm, lux ..., depending on the mode)
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetInterruptThresholds(VL53L0X_DEV Dev,
- VL53L0X_DeviceModes DeviceMode, FixPoint1616_t ThresholdLow,
- FixPoint1616_t ThresholdHigh);
-
-/**
- * @brief Get high and low Interrupt thresholds for a given mode
- * (ranging, ALS, ...) for a given device
- *
- * @par Function Description
- * Get high and low Interrupt thresholds for a given mode (ranging, ALS, ...)
- * for a given device
- *
- * @note This function Access to the device
- *
- * @note DeviceMode is ignored for the current device
- *
- * @param Dev Device Handle
- * @param DeviceMode Device Mode from which read thresholds
- * @param pThresholdLow Low threshold (mm, lux ..., depending on the mode)
- * @param pThresholdHigh High threshold (mm, lux ..., depending on the mode)
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetInterruptThresholds(VL53L0X_DEV Dev,
- VL53L0X_DeviceModes DeviceMode, FixPoint1616_t *pThresholdLow,
- FixPoint1616_t *pThresholdHigh);
-
-/**
- * @brief Return device stop completion status
- *
- * @par Function Description
- * Returns stop completiob status.
- * User shall call this function after a stop command
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pStopStatus Pointer to status variable to update
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetStopCompletedStatus(VL53L0X_DEV Dev,
- uint32_t *pStopStatus);
-
-
-/**
- * @brief Clear given system interrupt condition
- *
- * @par Function Description
- * Clear given interrupt(s).
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param InterruptMask Mask of interrupts to clear
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_INTERRUPT_NOT_CLEARED Cannot clear interrupts
- *
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_ClearInterruptMask(VL53L0X_DEV Dev,
- uint32_t InterruptMask);
-
-/**
- * @brief Return device interrupt status
- *
- * @par Function Description
- * Returns currently raised interrupts by the device.
- * User shall be able to activate/deactivate interrupts through
- * @a VL53L0X_SetGpioConfig()
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pInterruptMaskStatus Pointer to status variable to update
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetInterruptMaskStatus(VL53L0X_DEV Dev,
- uint32_t *pInterruptMaskStatus);
-
-/**
- * @brief Configure ranging interrupt reported to system
- *
- * @note This function is not Implemented
- *
- * @param Dev Device Handle
- * @param InterruptMask Mask of interrupt to Enable/disable
- * (0:interrupt disabled or 1: interrupt enabled)
- * @return VL53L0X_ERROR_NOT_IMPLEMENTED Not implemented
- */
-VL53L0X_API VL53L0X_Error VL53L0X_EnableInterruptMask(VL53L0X_DEV Dev,
- uint32_t InterruptMask);
-
-/** @} VL53L0X_interrupt_group */
-
-/** @defgroup VL53L0X_SPADfunctions_group VL53L0X SPAD Functions
- * @brief Functions used for SPAD managements
- * @{
- */
-
-/**
- * @brief Set the SPAD Ambient Damper Threshold value
- *
- * @par Function Description
- * This function set the SPAD Ambient Damper Threshold value
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param SpadAmbientDamperThreshold SPAD Ambient Damper Threshold value
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetSpadAmbientDamperThreshold(VL53L0X_DEV Dev,
- uint16_t SpadAmbientDamperThreshold);
-
-/**
- * @brief Get the current SPAD Ambient Damper Threshold value
- *
- * @par Function Description
- * This function get the SPAD Ambient Damper Threshold value
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pSpadAmbientDamperThreshold Pointer to programmed
- * SPAD Ambient Damper Threshold value
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetSpadAmbientDamperThreshold(VL53L0X_DEV Dev,
- uint16_t *pSpadAmbientDamperThreshold);
-
-/**
- * @brief Set the SPAD Ambient Damper Factor value
- *
- * @par Function Description
- * This function set the SPAD Ambient Damper Factor value
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param SpadAmbientDamperFactor SPAD Ambient Damper Factor value
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetSpadAmbientDamperFactor(VL53L0X_DEV Dev,
- uint16_t SpadAmbientDamperFactor);
-
-/**
- * @brief Get the current SPAD Ambient Damper Factor value
- *
- * @par Function Description
- * This function get the SPAD Ambient Damper Factor value
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param pSpadAmbientDamperFactor Pointer to programmed SPAD Ambient
- * Damper Factor value
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetSpadAmbientDamperFactor(VL53L0X_DEV Dev,
- uint16_t *pSpadAmbientDamperFactor);
-
-/**
- * @brief Performs Reference Spad Management
- *
- * @par Function Description
- * The reference SPAD initialization procedure determines the minimum amount
- * of reference spads to be enables to achieve a target reference signal rate
- * and should be performed once during initialization.
- *
- * @note This function Access to the device
- *
- * @note This function change the device mode to
- * VL53L0X_DEVICEMODE_SINGLE_RANGING
- *
- * @param Dev Device Handle
- * @param refSpadCount Reports ref Spad Count
- * @param isApertureSpads Reports if spads are of type
- * aperture or non-aperture.
- * 1:=aperture, 0:=Non-Aperture
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_REF_SPAD_INIT Error in the Ref Spad procedure.
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_PerformRefSpadManagement(VL53L0X_DEV Dev,
- uint32_t *refSpadCount, uint8_t *isApertureSpads);
-
-/**
- * @brief Applies Reference SPAD configuration
- *
- * @par Function Description
- * This function applies a given number of reference spads, identified as
- * either Aperture or Non-Aperture.
- * The requested spad count and type are stored within the device specific
- * parameters data for access by the host.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param refSpadCount Number of ref spads.
- * @param isApertureSpads Defines if spads are of type
- * aperture or non-aperture.
- * 1:=aperture, 0:=Non-Aperture
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_REF_SPAD_INIT Error in the in the reference
- * spad configuration.
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_SetReferenceSpads(VL53L0X_DEV Dev,
- uint32_t refSpadCount, uint8_t isApertureSpads);
-
-/**
- * @brief Retrieves SPAD configuration
- *
- * @par Function Description
- * This function retrieves the current number of applied reference spads
- * and also their type : Aperture or Non-Aperture.
- *
- * @note This function Access to the device
- *
- * @param Dev Device Handle
- * @param refSpadCount Number ref Spad Count
- * @param isApertureSpads Reports if spads are of type
- * aperture or non-aperture.
- * 1:=aperture, 0:=Non-Aperture
- * @return VL53L0X_ERROR_NONE Success
- * @return VL53L0X_ERROR_REF_SPAD_INIT Error in the in the reference
- * spad configuration.
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_API VL53L0X_Error VL53L0X_GetReferenceSpads(VL53L0X_DEV Dev,
- uint32_t *refSpadCount, uint8_t *isApertureSpads);
-
-/** @} VL53L0X_SPADfunctions_group */
-
-/** @} VL53L0X_cut11_group */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _VL53L0X_API_H_ */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_calibration.c b/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_calibration.c
deleted file mode 100644
index 231f84ad2..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_calibration.c
+++ /dev/null
@@ -1,1259 +0,0 @@
-/**
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2019-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-#include "vl53l0x_api.h"
-#include "vl53l0x_api_core.h"
-#include "vl53l0x_api_calibration.h"
-
-#ifndef __KERNEL__
-#include <stdlib.h>
-#endif
-
-#define LOG_FUNCTION_START(fmt, ...) \
- _LOG_FUNCTION_START(TRACE_MODULE_API, fmt, ##__VA_ARGS__)
-#define LOG_FUNCTION_END(status, ...) \
- _LOG_FUNCTION_END(TRACE_MODULE_API, status, ##__VA_ARGS__)
-#define LOG_FUNCTION_END_FMT(status, fmt, ...) \
- _LOG_FUNCTION_END_FMT(TRACE_MODULE_API, status, fmt, ##__VA_ARGS__)
-
-#define REF_ARRAY_SPAD_0 0
-#define REF_ARRAY_SPAD_5 5
-#define REF_ARRAY_SPAD_10 10
-
-uint32_t refArrayQuadrants[4] = {REF_ARRAY_SPAD_10, REF_ARRAY_SPAD_5,
- REF_ARRAY_SPAD_0, REF_ARRAY_SPAD_5 };
-
-VL53L0X_Error VL53L0X_perform_xtalk_calibration(VL53L0X_DEV Dev,
- FixPoint1616_t XTalkCalDistance,
- FixPoint1616_t *pXTalkCompensationRateMegaCps)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint16_t sum_ranging = 0;
- uint16_t sum_spads = 0;
- FixPoint1616_t sum_signalRate = 0;
- FixPoint1616_t total_count = 0;
- uint8_t xtalk_meas = 0;
- VL53L0X_RangingMeasurementData_t RangingMeasurementData;
- FixPoint1616_t xTalkStoredMeanSignalRate;
- FixPoint1616_t xTalkStoredMeanRange;
- FixPoint1616_t xTalkStoredMeanRtnSpads;
- uint32_t signalXTalkTotalPerSpad;
- uint32_t xTalkStoredMeanRtnSpadsAsInt;
- uint32_t xTalkCalDistanceAsInt;
- FixPoint1616_t XTalkCompensationRateMegaCps;
-
- if (XTalkCalDistance <= 0)
- Status = VL53L0X_ERROR_INVALID_PARAMS;
-
- /* Disable the XTalk compensation */
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_SetXTalkCompensationEnable(Dev, 0);
-
- /* Disable the RIT */
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_SetLimitCheckEnable(Dev,
- VL53L0X_CHECKENABLE_RANGE_IGNORE_THRESHOLD, 0);
- }
-
- /* Perform 50 measurements and compute the averages */
- if (Status == VL53L0X_ERROR_NONE) {
- sum_ranging = 0;
- sum_spads = 0;
- sum_signalRate = 0;
- total_count = 0;
- for (xtalk_meas = 0; xtalk_meas < 50; xtalk_meas++) {
- Status = VL53L0X_PerformSingleRangingMeasurement(Dev,
- &RangingMeasurementData);
-
- if (Status != VL53L0X_ERROR_NONE)
- break;
-
- /* The range is valid when RangeStatus = 0 */
- if (RangingMeasurementData.RangeStatus == 0) {
- sum_ranging = sum_ranging +
- RangingMeasurementData.RangeMilliMeter;
- sum_signalRate = sum_signalRate +
- RangingMeasurementData.SignalRateRtnMegaCps;
- sum_spads = sum_spads +
- RangingMeasurementData.EffectiveSpadRtnCount
- / 256;
- total_count = total_count + 1;
- }
- }
-
- /* no valid values found */
- if (total_count == 0)
- Status = VL53L0X_ERROR_RANGE_ERROR;
-
- }
-
-
- if (Status == VL53L0X_ERROR_NONE) {
- /* FixPoint1616_t / uint16_t = FixPoint1616_t */
- xTalkStoredMeanSignalRate = sum_signalRate / total_count;
- xTalkStoredMeanRange = (FixPoint1616_t)((uint32_t)(
- sum_ranging << 16) / total_count);
- xTalkStoredMeanRtnSpads = (FixPoint1616_t)((uint32_t)(
- sum_spads << 16) / total_count);
-
- /* Round Mean Spads to Whole Number.
- * Typically the calculated mean SPAD count is a whole number
- * or very close to a whole
- * number, therefore any truncation will not result in a
- * significant loss in accuracy.
- * Also, for a grey target at a typical distance of around
- * 400mm, around 220 SPADs will
- * be enabled, therefore, any truncation will result in a loss
- * of accuracy of less than
- * 0.5%.
- */
- xTalkStoredMeanRtnSpadsAsInt = (xTalkStoredMeanRtnSpads +
- 0x8000) >> 16;
-
- /* Round Cal Distance to Whole Number.
- * Note that the cal distance is in mm, therefore no resolution
- * is lost.*/
- xTalkCalDistanceAsInt = (XTalkCalDistance + 0x8000) >> 16;
-
- if (xTalkStoredMeanRtnSpadsAsInt == 0 ||
- xTalkCalDistanceAsInt == 0 ||
- xTalkStoredMeanRange >= XTalkCalDistance) {
- XTalkCompensationRateMegaCps = 0;
- } else {
- /* Round Cal Distance to Whole Number.
- Note that the cal distance is in mm, therefore no
- resolution is lost.*/
- xTalkCalDistanceAsInt = (XTalkCalDistance +
- 0x8000) >> 16;
-
- /* Apply division by mean spad count early in the
- * calculation to keep the numbers small.
- * This ensures we can maintain a 32bit calculation.
- * Fixed1616 / int := Fixed1616 */
- signalXTalkTotalPerSpad = (xTalkStoredMeanSignalRate) /
- xTalkStoredMeanRtnSpadsAsInt;
-
- /* Complete the calculation for total Signal XTalk per
- * SPAD
- * Fixed1616 * (Fixed1616 - Fixed1616/int) :=
- * (2^16 * Fixed1616)
- */
- signalXTalkTotalPerSpad *= ((1 << 16) -
- (xTalkStoredMeanRange / xTalkCalDistanceAsInt));
-
- /* Round from 2^16 * Fixed1616, to Fixed1616. */
- XTalkCompensationRateMegaCps = (signalXTalkTotalPerSpad
- + 0x8000) >> 16;
- }
-
- *pXTalkCompensationRateMegaCps = XTalkCompensationRateMegaCps;
-
- /* Enable the XTalk compensation */
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_SetXTalkCompensationEnable(Dev, 1);
-
- /* Enable the XTalk compensation */
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_SetXTalkCompensationRateMegaCps(Dev,
- XTalkCompensationRateMegaCps);
-
- }
-
- return Status;
-}
-
-VL53L0X_Error VL53L0X_perform_offset_calibration(VL53L0X_DEV Dev,
- FixPoint1616_t CalDistanceMilliMeter,
- int32_t *pOffsetMicroMeter)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint16_t sum_ranging = 0;
- FixPoint1616_t total_count = 0;
- VL53L0X_RangingMeasurementData_t RangingMeasurementData;
- FixPoint1616_t StoredMeanRange;
- uint32_t StoredMeanRangeAsInt;
- uint32_t CalDistanceAsInt_mm;
- uint8_t SequenceStepEnabled;
- int meas = 0;
-
- if (CalDistanceMilliMeter <= 0)
- Status = VL53L0X_ERROR_INVALID_PARAMS;
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_SetOffsetCalibrationDataMicroMeter(Dev, 0);
-
-
- /* Get the value of the TCC */
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_GetSequenceStepEnable(Dev,
- VL53L0X_SEQUENCESTEP_TCC, &SequenceStepEnabled);
-
-
- /* Disable the TCC */
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_SetSequenceStepEnable(Dev,
- VL53L0X_SEQUENCESTEP_TCC, 0);
-
-
- /* Disable the RIT */
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_SetLimitCheckEnable(Dev,
- VL53L0X_CHECKENABLE_RANGE_IGNORE_THRESHOLD, 0);
-
- /* Perform 50 measurements and compute the averages */
- if (Status == VL53L0X_ERROR_NONE) {
- sum_ranging = 0;
- total_count = 0;
- for (meas = 0; meas < 50; meas++) {
- Status = VL53L0X_PerformSingleRangingMeasurement(Dev,
- &RangingMeasurementData);
-
- if (Status != VL53L0X_ERROR_NONE)
- break;
-
- /* The range is valid when RangeStatus = 0 */
- if (RangingMeasurementData.RangeStatus == 0) {
- sum_ranging = sum_ranging +
- RangingMeasurementData.RangeMilliMeter;
- total_count = total_count + 1;
- }
- }
-
- /* no valid values found */
- if (total_count == 0)
- Status = VL53L0X_ERROR_RANGE_ERROR;
- }
-
-
- if (Status == VL53L0X_ERROR_NONE) {
- /* FixPoint1616_t / uint16_t = FixPoint1616_t */
- StoredMeanRange = (FixPoint1616_t)((uint32_t)(sum_ranging << 16)
- / total_count);
-
- StoredMeanRangeAsInt = (StoredMeanRange + 0x8000) >> 16;
-
- /* Round Cal Distance to Whole Number.
- * Note that the cal distance is in mm, therefore no resolution
- * is lost.*/
- CalDistanceAsInt_mm = (CalDistanceMilliMeter + 0x8000) >> 16;
-
- *pOffsetMicroMeter = (CalDistanceAsInt_mm -
- StoredMeanRangeAsInt) * 1000;
-
- /* Apply the calculated offset */
- if (Status == VL53L0X_ERROR_NONE) {
- VL53L0X_SETPARAMETERFIELD(Dev, RangeOffsetMicroMeters,
- *pOffsetMicroMeter);
- Status = VL53L0X_SetOffsetCalibrationDataMicroMeter(Dev,
- *pOffsetMicroMeter);
- }
-
- }
-
- /* Restore the TCC */
- if (Status == VL53L0X_ERROR_NONE) {
- if (SequenceStepEnabled != 0)
- Status = VL53L0X_SetSequenceStepEnable(Dev,
- VL53L0X_SEQUENCESTEP_TCC, 1);
- }
-
- return Status;
-}
-
-
-VL53L0X_Error VL53L0X_set_offset_calibration_data_micro_meter(VL53L0X_DEV Dev,
- int32_t OffsetCalibrationDataMicroMeter)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- int32_t cMaxOffsetMicroMeter = 511000;
- int32_t cMinOffsetMicroMeter = -512000;
- int16_t cOffsetRange = 4096;
- uint32_t encodedOffsetVal;
-
- LOG_FUNCTION_START("");
-
- if (OffsetCalibrationDataMicroMeter > cMaxOffsetMicroMeter)
- OffsetCalibrationDataMicroMeter = cMaxOffsetMicroMeter;
- else if (OffsetCalibrationDataMicroMeter < cMinOffsetMicroMeter)
- OffsetCalibrationDataMicroMeter = cMinOffsetMicroMeter;
-
- /* The offset register is 10.2 format and units are mm
- * therefore conversion is applied by a division of
- * 250.
- */
- if (OffsetCalibrationDataMicroMeter >= 0) {
- encodedOffsetVal =
- OffsetCalibrationDataMicroMeter/250;
- } else {
- encodedOffsetVal =
- cOffsetRange +
- OffsetCalibrationDataMicroMeter/250;
- }
-
- Status = VL53L0X_WrWord(Dev,
- VL53L0X_REG_ALGO_PART_TO_PART_RANGE_OFFSET_MM,
- encodedOffsetVal);
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_get_offset_calibration_data_micro_meter(VL53L0X_DEV Dev,
- int32_t *pOffsetCalibrationDataMicroMeter)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint16_t RangeOffsetRegister;
- int16_t cMaxOffset = 2047;
- int16_t cOffsetRange = 4096;
-
- /* Note that offset has 10.2 format */
-
- Status = VL53L0X_RdWord(Dev,
- VL53L0X_REG_ALGO_PART_TO_PART_RANGE_OFFSET_MM,
- &RangeOffsetRegister);
-
- if (Status == VL53L0X_ERROR_NONE) {
- RangeOffsetRegister = (RangeOffsetRegister & 0x0fff);
-
- /* Apply 12 bit 2's compliment conversion */
- if (RangeOffsetRegister > cMaxOffset)
- *pOffsetCalibrationDataMicroMeter =
- (int16_t)(RangeOffsetRegister - cOffsetRange)
- * 250;
- else
- *pOffsetCalibrationDataMicroMeter =
- (int16_t)RangeOffsetRegister * 250;
-
- }
-
- return Status;
-}
-
-
-VL53L0X_Error VL53L0X_apply_offset_adjustment(VL53L0X_DEV Dev)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- int32_t CorrectedOffsetMicroMeters;
- int32_t CurrentOffsetMicroMeters;
-
- /* if we run on this function we can read all the NVM info
- * used by the API */
- Status = VL53L0X_get_info_from_device(Dev, 7);
-
- /* Read back current device offset */
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_GetOffsetCalibrationDataMicroMeter(Dev,
- &CurrentOffsetMicroMeters);
- }
-
- /* Apply Offset Adjustment derived from 400mm measurements */
- if (Status == VL53L0X_ERROR_NONE) {
-
- /* Store initial device offset */
- PALDevDataSet(Dev, Part2PartOffsetNVMMicroMeter,
- CurrentOffsetMicroMeters);
-
- CorrectedOffsetMicroMeters = CurrentOffsetMicroMeters +
- (int32_t)PALDevDataGet(Dev,
- Part2PartOffsetAdjustmentNVMMicroMeter);
-
- Status = VL53L0X_SetOffsetCalibrationDataMicroMeter(Dev,
- CorrectedOffsetMicroMeters);
-
- /* store current, adjusted offset */
- if (Status == VL53L0X_ERROR_NONE) {
- VL53L0X_SETPARAMETERFIELD(Dev, RangeOffsetMicroMeters,
- CorrectedOffsetMicroMeters);
- }
- }
-
- return Status;
-}
-
-void get_next_good_spad(uint8_t goodSpadArray[], uint32_t size,
- uint32_t curr, int32_t *next)
-{
- uint32_t startIndex;
- uint32_t fineOffset;
- uint32_t cSpadsPerByte = 8;
- uint32_t coarseIndex;
- uint32_t fineIndex;
- uint8_t dataByte;
- uint8_t success = 0;
-
- /*
- * Starting with the current good spad, loop through the array to find
- * the next. i.e. the next bit set in the sequence.
- *
- * The coarse index is the byte index of the array and the fine index is
- * the index of the bit within each byte.
- */
-
- *next = -1;
-
- startIndex = curr / cSpadsPerByte;
- fineOffset = curr % cSpadsPerByte;
-
- for (coarseIndex = startIndex; ((coarseIndex < size) && !success);
- coarseIndex++) {
- fineIndex = 0;
- dataByte = goodSpadArray[coarseIndex];
-
- if (coarseIndex == startIndex) {
- /* locate the bit position of the provided current
- * spad bit before iterating */
- dataByte >>= fineOffset;
- fineIndex = fineOffset;
- }
-
- while (fineIndex < cSpadsPerByte) {
- if ((dataByte & 0x1) == 1) {
- success = 1;
- *next = coarseIndex * cSpadsPerByte + fineIndex;
- break;
- }
- dataByte >>= 1;
- fineIndex++;
- }
- }
-}
-
-
-uint8_t is_aperture(uint32_t spadIndex)
-{
- /*
- * This function reports if a given spad index is an aperture SPAD by
- * deriving the quadrant.
- */
- uint32_t quadrant;
- uint8_t isAperture = 1;
- quadrant = spadIndex >> 6;
- if (refArrayQuadrants[quadrant] == REF_ARRAY_SPAD_0)
- isAperture = 0;
-
- return isAperture;
-}
-
-
-VL53L0X_Error enable_spad_bit(uint8_t spadArray[], uint32_t size,
- uint32_t spadIndex)
-{
- VL53L0X_Error status = VL53L0X_ERROR_NONE;
- uint32_t cSpadsPerByte = 8;
- uint32_t coarseIndex;
- uint32_t fineIndex;
-
- coarseIndex = spadIndex / cSpadsPerByte;
- fineIndex = spadIndex % cSpadsPerByte;
- if (coarseIndex >= size)
- status = VL53L0X_ERROR_REF_SPAD_INIT;
- else
- spadArray[coarseIndex] |= (1 << fineIndex);
-
- return status;
-}
-
-VL53L0X_Error count_enabled_spads(uint8_t spadArray[],
- uint32_t byteCount, uint32_t maxSpads,
- uint32_t *pTotalSpadsEnabled, uint8_t *pIsAperture)
-{
- VL53L0X_Error status = VL53L0X_ERROR_NONE;
- uint32_t cSpadsPerByte = 8;
- uint32_t lastByte;
- uint32_t lastBit;
- uint32_t byteIndex = 0;
- uint32_t bitIndex = 0;
- uint8_t tempByte;
- uint8_t spadTypeIdentified = 0;
-
- /* The entire array will not be used for spads, therefore the last
- * byte and last bit is determined from the max spads value.
- */
-
- lastByte = maxSpads / cSpadsPerByte;
- lastBit = maxSpads % cSpadsPerByte;
-
- /* Check that the max spads value does not exceed the array bounds. */
- if (lastByte >= byteCount)
- status = VL53L0X_ERROR_REF_SPAD_INIT;
-
- *pTotalSpadsEnabled = 0;
-
- /* Count the bits enabled in the whole bytes */
- for (byteIndex = 0; byteIndex <= (lastByte - 1); byteIndex++) {
- tempByte = spadArray[byteIndex];
-
- for (bitIndex = 0; bitIndex <= cSpadsPerByte; bitIndex++) {
- if ((tempByte & 0x01) == 1) {
- (*pTotalSpadsEnabled)++;
-
- if (!spadTypeIdentified) {
- *pIsAperture = 1;
- if ((byteIndex < 2) && (bitIndex < 4))
- *pIsAperture = 0;
- spadTypeIdentified = 1;
- }
- }
- tempByte >>= 1;
- }
- }
-
- /* Count the number of bits enabled in the last byte accounting
- * for the fact that not all bits in the byte may be used.
- */
- tempByte = spadArray[lastByte];
-
- for (bitIndex = 0; bitIndex <= lastBit; bitIndex++) {
- if ((tempByte & 0x01) == 1)
- (*pTotalSpadsEnabled)++;
- }
-
- return status;
-}
-
-VL53L0X_Error set_ref_spad_map(VL53L0X_DEV Dev, uint8_t *refSpadArray)
-{
- VL53L0X_Error status = VL53L0X_WriteMulti(Dev,
- VL53L0X_REG_GLOBAL_CONFIG_SPAD_ENABLES_REF_0,
- refSpadArray, 6);
- return status;
-}
-
-VL53L0X_Error get_ref_spad_map(VL53L0X_DEV Dev, uint8_t *refSpadArray)
-{
- VL53L0X_Error status = VL53L0X_ReadMulti(Dev,
- VL53L0X_REG_GLOBAL_CONFIG_SPAD_ENABLES_REF_0,
- refSpadArray,
- 6);
- return status;
-}
-
-VL53L0X_Error enable_ref_spads(VL53L0X_DEV Dev,
- uint8_t apertureSpads,
- uint8_t goodSpadArray[],
- uint8_t spadArray[],
- uint32_t size,
- uint32_t start,
- uint32_t offset,
- uint32_t spadCount,
- uint32_t *lastSpad)
-{
- VL53L0X_Error status = VL53L0X_ERROR_NONE;
- uint32_t index;
- uint32_t i;
- int32_t nextGoodSpad = offset;
- uint32_t currentSpad;
- uint8_t checkSpadArray[6];
-
- /*
- * This function takes in a spad array which may or may not have SPADS
- * already enabled and appends from a given offset a requested number
- * of new SPAD enables. The 'good spad map' is applied to
- * determine the next SPADs to enable.
- *
- * This function applies to only aperture or only non-aperture spads.
- * Checks are performed to ensure this.
- */
-
- currentSpad = offset;
- for (index = 0; index < spadCount; index++) {
- get_next_good_spad(goodSpadArray, size, currentSpad,
- &nextGoodSpad);
-
- if (nextGoodSpad == -1) {
- status = VL53L0X_ERROR_REF_SPAD_INIT;
- break;
- }
-
- /* Confirm that the next good SPAD is non-aperture */
- if (is_aperture(start + nextGoodSpad) != apertureSpads) {
- /* if we can't get the required number of good aperture
- * spads from the current quadrant then this is an error
- */
- status = VL53L0X_ERROR_REF_SPAD_INIT;
- break;
- }
- currentSpad = (uint32_t)nextGoodSpad;
- enable_spad_bit(spadArray, size, currentSpad);
- currentSpad++;
- }
- *lastSpad = currentSpad;
-
- if (status == VL53L0X_ERROR_NONE)
- status = set_ref_spad_map(Dev, spadArray);
-
-
- if (status == VL53L0X_ERROR_NONE) {
- status = get_ref_spad_map(Dev, checkSpadArray);
-
- i = 0;
-
- /* Compare spad maps. If not equal report error. */
- while (i < size) {
- if (spadArray[i] != checkSpadArray[i]) {
- status = VL53L0X_ERROR_REF_SPAD_INIT;
- break;
- }
- i++;
- }
- }
- return status;
-}
-
-
-VL53L0X_Error perform_ref_signal_measurement(VL53L0X_DEV Dev,
- uint16_t *refSignalRate)
-{
- VL53L0X_Error status = VL53L0X_ERROR_NONE;
- VL53L0X_RangingMeasurementData_t rangingMeasurementData;
-
- uint8_t SequenceConfig = 0;
-
- /* store the value of the sequence config,
- * this will be reset before the end of the function
- */
-
- SequenceConfig = PALDevDataGet(Dev, SequenceConfig);
-
- /*
- * This function performs a reference signal rate measurement.
- */
- if (status == VL53L0X_ERROR_NONE)
- status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_SYSTEM_SEQUENCE_CONFIG, 0xC0);
-
- if (status == VL53L0X_ERROR_NONE)
- status = VL53L0X_PerformSingleRangingMeasurement(Dev,
- &rangingMeasurementData);
-
- if (status == VL53L0X_ERROR_NONE)
- status = VL53L0X_WrByte(Dev, 0xFF, 0x01);
-
- if (status == VL53L0X_ERROR_NONE)
- status = VL53L0X_RdWord(Dev,
- VL53L0X_REG_RESULT_PEAK_SIGNAL_RATE_REF,
- refSignalRate);
-
- if (status == VL53L0X_ERROR_NONE)
- status = VL53L0X_WrByte(Dev, 0xFF, 0x00);
-
- if (status == VL53L0X_ERROR_NONE) {
- /* restore the previous Sequence Config */
- status = VL53L0X_WrByte(Dev, VL53L0X_REG_SYSTEM_SEQUENCE_CONFIG,
- SequenceConfig);
- if (status == VL53L0X_ERROR_NONE)
- PALDevDataSet(Dev, SequenceConfig, SequenceConfig);
- }
-
- return status;
-}
-
-VL53L0X_Error VL53L0X_perform_ref_spad_management(VL53L0X_DEV Dev,
- uint32_t *refSpadCount,
- uint8_t *isApertureSpads)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t lastSpadArray[6];
- uint8_t startSelect = 0xB4;
- uint32_t minimumSpadCount = 3;
- uint32_t maxSpadCount = 44;
- uint32_t currentSpadIndex = 0;
- uint32_t lastSpadIndex = 0;
- int32_t nextGoodSpad = 0;
- uint16_t targetRefRate = 0x0A00; /* 20 MCPS in 9:7 format */
- uint16_t peakSignalRateRef;
- uint32_t needAptSpads = 0;
- uint32_t index = 0;
- uint32_t spadArraySize = 6;
- uint32_t signalRateDiff = 0;
- uint32_t lastSignalRateDiff = 0;
- uint8_t complete = 0;
- uint8_t VhvSettings = 0;
- uint8_t PhaseCal = 0;
- uint32_t refSpadCount_int = 0;
- uint8_t isApertureSpads_int = 0;
-
- /*
- * The reference SPAD initialization procedure determines the minimum
- * amount of reference spads to be enables to achieve a target reference
- * signal rate and should be performed once during initialization.
- *
- * Either aperture or non-aperture spads are applied but never both.
- * Firstly non-aperture spads are set, beginning with 5 spads, and
- * increased one spad at a time until the closest measurement to the
- * target rate is achieved.
- *
- * If the target rate is exceeded when 5 non-aperture spads are enabled,
- * initialization is performed instead with aperture spads.
- *
- * When setting spads, a 'Good Spad Map' is applied.
- *
- * This procedure operates within a SPAD window of interest of a maximum
- * 44 spads.
- * The start point is currently fixed to 180, which lies towards the end
- * of the non-aperture quadrant and runs in to the adjacent aperture
- * quadrant.
- */
-
-
- targetRefRate = PALDevDataGet(Dev, targetRefRate);
-
- /*
- * Initialize Spad arrays.
- * Currently the good spad map is initialised to 'All good'.
- * This is a short term implementation. The good spad map will be
- * provided as an input.
- * Note that there are 6 bytes. Only the first 44 bits will be used to
- * represent spads.
- */
- for (index = 0; index < spadArraySize; index++)
- Dev->Data.SpadData.RefSpadEnables[index] = 0;
-
-
- Status = VL53L0X_WrByte(Dev, 0xFF, 0x01);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_DYNAMIC_SPAD_REF_EN_START_OFFSET, 0x00);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_DYNAMIC_SPAD_NUM_REQUESTED_REF_SPAD, 0x2C);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_WrByte(Dev, 0xFF, 0x00);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_GLOBAL_CONFIG_REF_EN_START_SELECT,
- startSelect);
-
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_POWER_MANAGEMENT_GO1_POWER_FORCE, 0);
-
- /* Perform ref calibration */
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_perform_ref_calibration(Dev, &VhvSettings,
- &PhaseCal, 0);
-
- if (Status == VL53L0X_ERROR_NONE) {
- /* Enable Minimum NON-APERTURE Spads */
- currentSpadIndex = 0;
- lastSpadIndex = currentSpadIndex;
- needAptSpads = 0;
- Status = enable_ref_spads(Dev,
- needAptSpads,
- Dev->Data.SpadData.RefGoodSpadMap,
- Dev->Data.SpadData.RefSpadEnables,
- spadArraySize,
- startSelect,
- currentSpadIndex,
- minimumSpadCount,
- &lastSpadIndex);
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- currentSpadIndex = lastSpadIndex;
-
- Status = perform_ref_signal_measurement(Dev,
- &peakSignalRateRef);
- if ((Status == VL53L0X_ERROR_NONE) &&
- (peakSignalRateRef > targetRefRate)) {
- /* Signal rate measurement too high,
- * switch to APERTURE SPADs */
-
- for (index = 0; index < spadArraySize; index++)
- Dev->Data.SpadData.RefSpadEnables[index] = 0;
-
-
- /* Increment to the first APERTURE spad */
- while ((is_aperture(startSelect + currentSpadIndex)
- == 0) && (currentSpadIndex < maxSpadCount)) {
- currentSpadIndex++;
- }
-
- needAptSpads = 1;
-
- Status = enable_ref_spads(Dev,
- needAptSpads,
- Dev->Data.SpadData.RefGoodSpadMap,
- Dev->Data.SpadData.RefSpadEnables,
- spadArraySize,
- startSelect,
- currentSpadIndex,
- minimumSpadCount,
- &lastSpadIndex);
-
- if (Status == VL53L0X_ERROR_NONE) {
- currentSpadIndex = lastSpadIndex;
- Status = perform_ref_signal_measurement(Dev,
- &peakSignalRateRef);
-
- if ((Status == VL53L0X_ERROR_NONE) &&
- (peakSignalRateRef > targetRefRate)) {
- /* Signal rate still too high after
- * setting the minimum number of
- * APERTURE spads. Can do no more
- * therefore set the min number of
- * aperture spads as the result.
- */
- isApertureSpads_int = 1;
- refSpadCount_int = minimumSpadCount;
- }
- }
- } else {
- needAptSpads = 0;
- }
- }
-
- if ((Status == VL53L0X_ERROR_NONE) &&
- (peakSignalRateRef < targetRefRate)) {
- /* At this point, the minimum number of either aperture
- * or non-aperture spads have been set. Proceed to add
- * spads and perform measurements until the target
- * reference is reached.
- */
- isApertureSpads_int = needAptSpads;
- refSpadCount_int = minimumSpadCount;
-
- memcpy(lastSpadArray, Dev->Data.SpadData.RefSpadEnables,
- spadArraySize);
- lastSignalRateDiff = abs(peakSignalRateRef -
- targetRefRate);
- complete = 0;
-
- while (!complete) {
- get_next_good_spad(
- Dev->Data.SpadData.RefGoodSpadMap,
- spadArraySize, currentSpadIndex,
- &nextGoodSpad);
-
- if (nextGoodSpad == -1) {
- Status = VL53L0X_ERROR_REF_SPAD_INIT;
- break;
- }
-
- (refSpadCount_int)++;
-
- /* Cannot combine Aperture and Non-Aperture spads, so
- * ensure the current spad is of the correct type.
- */
- if (is_aperture((uint32_t)startSelect + nextGoodSpad) !=
- needAptSpads) {
- Status = VL53L0X_ERROR_REF_SPAD_INIT;
- break;
- }
-
- currentSpadIndex = nextGoodSpad;
- Status = enable_spad_bit(
- Dev->Data.SpadData.RefSpadEnables,
- spadArraySize, currentSpadIndex);
-
- if (Status == VL53L0X_ERROR_NONE) {
- currentSpadIndex++;
- /* Proceed to apply the additional spad and
- * perform measurement. */
- Status = set_ref_spad_map(Dev,
- Dev->Data.SpadData.RefSpadEnables);
- }
-
- if (Status != VL53L0X_ERROR_NONE)
- break;
-
- Status = perform_ref_signal_measurement(Dev,
- &peakSignalRateRef);
-
- if (Status != VL53L0X_ERROR_NONE)
- break;
-
- signalRateDiff = abs(peakSignalRateRef - targetRefRate);
-
- if (peakSignalRateRef > targetRefRate) {
- /* Select the spad map that provides the
- * measurement closest to the target rate,
- * either above or below it.
- */
- if (signalRateDiff > lastSignalRateDiff) {
- /* Previous spad map produced a closer
- * measurement, so choose this. */
- Status = set_ref_spad_map(Dev,
- lastSpadArray);
- memcpy(
- Dev->Data.SpadData.RefSpadEnables,
- lastSpadArray, spadArraySize);
-
- (refSpadCount_int)--;
- }
- complete = 1;
- } else {
- /* Continue to add spads */
- lastSignalRateDiff = signalRateDiff;
- memcpy(lastSpadArray,
- Dev->Data.SpadData.RefSpadEnables,
- spadArraySize);
- }
-
- } /* while */
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- *refSpadCount = refSpadCount_int;
- *isApertureSpads = isApertureSpads_int;
-
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev, RefSpadsInitialised, 1);
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev,
- ReferenceSpadCount, (uint8_t)(*refSpadCount));
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev,
- ReferenceSpadType, *isApertureSpads);
- }
-
- return Status;
-}
-
-VL53L0X_Error VL53L0X_set_reference_spads(VL53L0X_DEV Dev,
- uint32_t count, uint8_t isApertureSpads)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint32_t currentSpadIndex = 0;
- uint8_t startSelect = 0xB4;
- uint32_t spadArraySize = 6;
- uint32_t maxSpadCount = 44;
- uint32_t lastSpadIndex;
- uint32_t index;
-
- /*
- * This function applies a requested number of reference spads, either
- * aperture or
- * non-aperture, as requested.
- * The good spad map will be applied.
- */
-
- Status = VL53L0X_WrByte(Dev, 0xFF, 0x01);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_DYNAMIC_SPAD_REF_EN_START_OFFSET, 0x00);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_DYNAMIC_SPAD_NUM_REQUESTED_REF_SPAD, 0x2C);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_WrByte(Dev, 0xFF, 0x00);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_GLOBAL_CONFIG_REF_EN_START_SELECT,
- startSelect);
-
- for (index = 0; index < spadArraySize; index++)
- Dev->Data.SpadData.RefSpadEnables[index] = 0;
-
- if (isApertureSpads) {
- /* Increment to the first APERTURE spad */
- while ((is_aperture(startSelect + currentSpadIndex) == 0) &&
- (currentSpadIndex < maxSpadCount)) {
- currentSpadIndex++;
- }
- }
- Status = enable_ref_spads(Dev,
- isApertureSpads,
- Dev->Data.SpadData.RefGoodSpadMap,
- Dev->Data.SpadData.RefSpadEnables,
- spadArraySize,
- startSelect,
- currentSpadIndex,
- count,
- &lastSpadIndex);
-
- if (Status == VL53L0X_ERROR_NONE) {
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev, RefSpadsInitialised, 1);
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev,
- ReferenceSpadCount, (uint8_t)(count));
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev,
- ReferenceSpadType, isApertureSpads);
- }
-
- return Status;
-}
-
-VL53L0X_Error VL53L0X_get_reference_spads(VL53L0X_DEV Dev,
- uint32_t *pSpadCount, uint8_t *pIsApertureSpads)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t refSpadsInitialised;
- uint8_t refSpadArray[6];
- uint32_t cMaxSpadCount = 44;
- uint32_t cSpadArraySize = 6;
- uint32_t spadsEnabled;
- uint8_t isApertureSpads = 0;
-
- refSpadsInitialised = VL53L0X_GETDEVICESPECIFICPARAMETER(Dev,
- RefSpadsInitialised);
-
- if (refSpadsInitialised == 1) {
-
- *pSpadCount = (uint32_t)VL53L0X_GETDEVICESPECIFICPARAMETER(Dev,
- ReferenceSpadCount);
- *pIsApertureSpads = VL53L0X_GETDEVICESPECIFICPARAMETER(Dev,
- ReferenceSpadType);
- } else {
-
- /* obtain spad info from device.*/
- Status = get_ref_spad_map(Dev, refSpadArray);
-
- if (Status == VL53L0X_ERROR_NONE) {
- /* count enabled spads within spad map array and
- * determine if Aperture or Non-Aperture.
- */
- Status = count_enabled_spads(refSpadArray,
- cSpadArraySize,
- cMaxSpadCount,
- &spadsEnabled,
- &isApertureSpads);
-
- if (Status == VL53L0X_ERROR_NONE) {
-
- *pSpadCount = spadsEnabled;
- *pIsApertureSpads = isApertureSpads;
-
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev,
- RefSpadsInitialised, 1);
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev,
- ReferenceSpadCount,
- (uint8_t)spadsEnabled);
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev,
- ReferenceSpadType, isApertureSpads);
- }
- }
- }
-
- return Status;
-}
-
-
-VL53L0X_Error VL53L0X_perform_single_ref_calibration(VL53L0X_DEV Dev,
- uint8_t vhv_init_byte)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_WrByte(Dev, VL53L0X_REG_SYSRANGE_START,
- VL53L0X_REG_SYSRANGE_MODE_START_STOP |
- vhv_init_byte);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_measurement_poll_for_completion(Dev);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_ClearInterruptMask(Dev, 0);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_WrByte(Dev, VL53L0X_REG_SYSRANGE_START, 0x00);
-
- return Status;
-}
-
-
-VL53L0X_Error VL53L0X_ref_calibration_io(VL53L0X_DEV Dev, uint8_t read_not_write,
- uint8_t VhvSettings, uint8_t PhaseCal,
- uint8_t *pVhvSettings, uint8_t *pPhaseCal,
- const uint8_t vhv_enable, const uint8_t phase_enable)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t PhaseCalint = 0;
-
- /* Read VHV from device */
- Status |= VL53L0X_WrByte(Dev, 0xFF, 0x01);
- Status |= VL53L0X_WrByte(Dev, 0x00, 0x00);
- Status |= VL53L0X_WrByte(Dev, 0xFF, 0x00);
-
- if (read_not_write) {
- if (vhv_enable)
- Status |= VL53L0X_RdByte(Dev, 0xCB, pVhvSettings);
- if (phase_enable)
- Status |= VL53L0X_RdByte(Dev, 0xEE, &PhaseCalint);
- } else {
- if (vhv_enable)
- Status |= VL53L0X_WrByte(Dev, 0xCB, VhvSettings);
- if (phase_enable)
- Status |= VL53L0X_UpdateByte(Dev, 0xEE, 0x80, PhaseCal);
- }
-
- Status |= VL53L0X_WrByte(Dev, 0xFF, 0x01);
- Status |= VL53L0X_WrByte(Dev, 0x00, 0x01);
- Status |= VL53L0X_WrByte(Dev, 0xFF, 0x00);
-
- *pPhaseCal = (uint8_t)(PhaseCalint&0xEF);
-
- return Status;
-}
-
-
-VL53L0X_Error VL53L0X_perform_vhv_calibration(VL53L0X_DEV Dev,
- uint8_t *pVhvSettings, const uint8_t get_data_enable,
- const uint8_t restore_config)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t SequenceConfig = 0;
- uint8_t VhvSettings = 0;
- uint8_t PhaseCal = 0;
- uint8_t PhaseCalInt = 0;
-
- /* store the value of the sequence config,
- * this will be reset before the end of the function
- */
-
- if (restore_config)
- SequenceConfig = PALDevDataGet(Dev, SequenceConfig);
-
- /* Run VHV */
- Status = VL53L0X_WrByte(Dev, VL53L0X_REG_SYSTEM_SEQUENCE_CONFIG, 0x01);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_perform_single_ref_calibration(Dev, 0x40);
-
- /* Read VHV from device */
- if ((Status == VL53L0X_ERROR_NONE) && (get_data_enable == 1)) {
- Status = VL53L0X_ref_calibration_io(Dev, 1,
- VhvSettings, PhaseCal, /* Not used here */
- pVhvSettings, &PhaseCalInt,
- 1, 0);
- } else
- *pVhvSettings = 0;
-
-
- if ((Status == VL53L0X_ERROR_NONE) && restore_config) {
- /* restore the previous Sequence Config */
- Status = VL53L0X_WrByte(Dev, VL53L0X_REG_SYSTEM_SEQUENCE_CONFIG,
- SequenceConfig);
- if (Status == VL53L0X_ERROR_NONE)
- PALDevDataSet(Dev, SequenceConfig, SequenceConfig);
-
- }
-
- return Status;
-}
-
-VL53L0X_Error VL53L0X_perform_phase_calibration(VL53L0X_DEV Dev,
- uint8_t *pPhaseCal, const uint8_t get_data_enable,
- const uint8_t restore_config)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t SequenceConfig = 0;
- uint8_t VhvSettings = 0;
- uint8_t PhaseCal = 0;
- uint8_t VhvSettingsint;
-
- /* store the value of the sequence config,
- * this will be reset before the end of the function
- */
-
- if (restore_config)
- SequenceConfig = PALDevDataGet(Dev, SequenceConfig);
-
- /* Run PhaseCal */
- Status = VL53L0X_WrByte(Dev, VL53L0X_REG_SYSTEM_SEQUENCE_CONFIG, 0x02);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_perform_single_ref_calibration(Dev, 0x0);
-
- /* Read PhaseCal from device */
- if ((Status == VL53L0X_ERROR_NONE) && (get_data_enable == 1)) {
- Status = VL53L0X_ref_calibration_io(Dev, 1,
- VhvSettings, PhaseCal, /* Not used here */
- &VhvSettingsint, pPhaseCal,
- 0, 1);
- } else
- *pPhaseCal = 0;
-
-
- if ((Status == VL53L0X_ERROR_NONE) && restore_config) {
- /* restore the previous Sequence Config */
- Status = VL53L0X_WrByte(Dev, VL53L0X_REG_SYSTEM_SEQUENCE_CONFIG,
- SequenceConfig);
- if (Status == VL53L0X_ERROR_NONE)
- PALDevDataSet(Dev, SequenceConfig, SequenceConfig);
-
- }
-
- return Status;
-}
-
-VL53L0X_Error VL53L0X_perform_ref_calibration(VL53L0X_DEV Dev,
- uint8_t *pVhvSettings, uint8_t *pPhaseCal, uint8_t get_data_enable)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t SequenceConfig = 0;
-
- /* store the value of the sequence config,
- * this will be reset before the end of the function
- */
-
- SequenceConfig = PALDevDataGet(Dev, SequenceConfig);
-
- /* In the following function we don't save the config to optimize
- * writes on device. Config is saved and restored only once. */
- Status = VL53L0X_perform_vhv_calibration(
- Dev, pVhvSettings, get_data_enable, 0);
-
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_perform_phase_calibration(
- Dev, pPhaseCal, get_data_enable, 0);
-
-
- if (Status == VL53L0X_ERROR_NONE) {
- /* restore the previous Sequence Config */
- Status = VL53L0X_WrByte(Dev, VL53L0X_REG_SYSTEM_SEQUENCE_CONFIG,
- SequenceConfig);
- if (Status == VL53L0X_ERROR_NONE)
- PALDevDataSet(Dev, SequenceConfig, SequenceConfig);
-
- }
-
- return Status;
-}
-
-VL53L0X_Error VL53L0X_set_ref_calibration(VL53L0X_DEV Dev,
- uint8_t VhvSettings, uint8_t PhaseCal)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t pVhvSettings;
- uint8_t pPhaseCal;
-
- Status = VL53L0X_ref_calibration_io(Dev, 0,
- VhvSettings, PhaseCal,
- &pVhvSettings, &pPhaseCal,
- 1, 1);
-
- return Status;
-}
-
-VL53L0X_Error VL53L0X_get_ref_calibration(VL53L0X_DEV Dev,
- uint8_t *pVhvSettings, uint8_t *pPhaseCal)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t VhvSettings = 0;
- uint8_t PhaseCal = 0;
-
- Status = VL53L0X_ref_calibration_io(Dev, 1,
- VhvSettings, PhaseCal,
- pVhvSettings, pPhaseCal,
- 1, 1);
-
- return Status;
-}
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_calibration.h b/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_calibration.h
deleted file mode 100644
index 7757e76d0..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_calibration.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2019-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-#ifndef _VL53L0X_API_CALIBRATION_H_
-#define _VL53L0X_API_CALIBRATION_H_
-
-#include "vl53l0x_def.h"
-#include "vl53l0x_platform.h"
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-VL53L0X_Error VL53L0X_perform_xtalk_calibration(VL53L0X_DEV Dev,
- FixPoint1616_t XTalkCalDistance,
- FixPoint1616_t *pXTalkCompensationRateMegaCps);
-
-VL53L0X_Error VL53L0X_perform_offset_calibration(VL53L0X_DEV Dev,
- FixPoint1616_t CalDistanceMilliMeter,
- int32_t *pOffsetMicroMeter);
-
-VL53L0X_Error VL53L0X_set_offset_calibration_data_micro_meter(VL53L0X_DEV Dev,
- int32_t OffsetCalibrationDataMicroMeter);
-
-VL53L0X_Error VL53L0X_get_offset_calibration_data_micro_meter(VL53L0X_DEV Dev,
- int32_t *pOffsetCalibrationDataMicroMeter);
-
-VL53L0X_Error VL53L0X_apply_offset_adjustment(VL53L0X_DEV Dev);
-
-VL53L0X_Error VL53L0X_perform_ref_spad_management(VL53L0X_DEV Dev,
- uint32_t *refSpadCount, uint8_t *isApertureSpads);
-
-VL53L0X_Error VL53L0X_set_reference_spads(VL53L0X_DEV Dev,
- uint32_t count, uint8_t isApertureSpads);
-
-VL53L0X_Error VL53L0X_get_reference_spads(VL53L0X_DEV Dev,
- uint32_t *pSpadCount, uint8_t *pIsApertureSpads);
-
-VL53L0X_Error VL53L0X_perform_phase_calibration(VL53L0X_DEV Dev,
- uint8_t *pPhaseCal, const uint8_t get_data_enable,
- const uint8_t restore_config);
-
-VL53L0X_Error VL53L0X_perform_ref_calibration(VL53L0X_DEV Dev,
- uint8_t *pVhvSettings, uint8_t *pPhaseCal, uint8_t get_data_enable);
-
-VL53L0X_Error VL53L0X_set_ref_calibration(VL53L0X_DEV Dev,
- uint8_t VhvSettings, uint8_t PhaseCal);
-
-VL53L0X_Error VL53L0X_get_ref_calibration(VL53L0X_DEV Dev,
- uint8_t *pVhvSettings, uint8_t *pPhaseCal);
-
-VL53L0X_Error enable_spad_bit(uint8_t spadArray[], uint32_t size,
- uint32_t spadIndex);
-
-VL53L0X_Error count_enabled_spads(uint8_t spadArray[],
- uint32_t byteCount, uint32_t maxSpads,
- uint32_t *pTotalSpadsEnabled, uint8_t *pIsAperture);
-
-VL53L0X_Error set_ref_spad_map(VL53L0X_DEV Dev, uint8_t *refSpadArray);
-
-VL53L0X_Error get_ref_spad_map(VL53L0X_DEV Dev, uint8_t *refSpadArray);
-
-VL53L0X_Error enable_ref_spads(VL53L0X_DEV Dev,
- uint8_t apertureSpads,
- uint8_t goodSpadArray[],
- uint8_t spadArray[],
- uint32_t size,
- uint32_t start,
- uint32_t offset,
- uint32_t spadCount,
- uint32_t *lastSpad);
-
-VL53L0X_Error perform_ref_signal_measurement(VL53L0X_DEV Dev,
- uint16_t *refSignalRate);
-
-
-VL53L0X_Error VL53L0X_perform_single_ref_calibration(VL53L0X_DEV Dev,
- uint8_t vhv_init_byte);
-
-VL53L0X_Error VL53L0X_ref_calibration_io(VL53L0X_DEV Dev, uint8_t read_not_write,
- uint8_t VhvSettings, uint8_t PhaseCal,
- uint8_t *pVhvSettings, uint8_t *pPhaseCal,
- const uint8_t vhv_enable, const uint8_t phase_enable);
-
-VL53L0X_Error VL53L0X_perform_vhv_calibration(VL53L0X_DEV Dev,
- uint8_t *pVhvSettings, const uint8_t get_data_enable,
- const uint8_t restore_config);
-
-void get_next_good_spad(uint8_t goodSpadArray[], uint32_t size,
- uint32_t curr, int32_t *next);
-
-uint8_t is_aperture(uint32_t spadIndex);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _VL53L0X_API_CALIBRATION_H_ */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_core.c b/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_core.c
deleted file mode 100644
index da6e8296c..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_core.c
+++ /dev/null
@@ -1,2243 +0,0 @@
-/**
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2019-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-#include "vl53l0x_api.h"
-#include "vl53l0x_api_core.h"
-#include "vl53l0x_api_calibration.h"
-
-
-#ifndef __KERNEL__
-#include <stdlib.h>
-#endif
-#define LOG_FUNCTION_START(fmt, ...) \
- _LOG_FUNCTION_START(TRACE_MODULE_API, fmt, ##__VA_ARGS__)
-#define LOG_FUNCTION_END(status, ...) \
- _LOG_FUNCTION_END(TRACE_MODULE_API, status, ##__VA_ARGS__)
-#define LOG_FUNCTION_END_FMT(status, fmt, ...) \
- _LOG_FUNCTION_END_FMT(TRACE_MODULE_API, status, fmt, ##__VA_ARGS__)
-
-VL53L0X_Error VL53L0X_reverse_bytes(uint8_t *data, uint32_t size)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t tempData;
- uint32_t mirrorIndex;
- uint32_t middle = size/2;
- uint32_t index;
-
- for (index = 0; index < middle; index++) {
- mirrorIndex = size - index - 1;
- tempData = data[index];
- data[index] = data[mirrorIndex];
- data[mirrorIndex] = tempData;
- }
- return Status;
-}
-
-VL53L0X_Error VL53L0X_measurement_poll_for_completion(VL53L0X_DEV Dev)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t NewDataReady = 0;
- uint32_t LoopNb;
-
- LOG_FUNCTION_START("");
-
- LoopNb = 0;
-
- do {
- Status = VL53L0X_GetMeasurementDataReady(Dev, &NewDataReady);
- if (Status != 0)
- break; /* the error is set */
-
- if (NewDataReady == 1)
- break; /* done note that status == 0 */
-
- LoopNb++;
- if (LoopNb >= VL53L0X_DEFAULT_MAX_LOOP) {
- Status = VL53L0X_ERROR_TIME_OUT;
- break;
- }
-
- VL53L0X_PollingDelay(Dev);
- } while (1);
-
- LOG_FUNCTION_END(Status);
-
- return Status;
-}
-
-
-uint8_t VL53L0X_decode_vcsel_period(uint8_t vcsel_period_reg)
-{
- /*!
- * Converts the encoded VCSEL period register value into the real
- * period in PLL clocks
- */
-
- uint8_t vcsel_period_pclks = 0;
-
- vcsel_period_pclks = (vcsel_period_reg + 1) << 1;
-
- return vcsel_period_pclks;
-}
-
-uint8_t VL53L0X_encode_vcsel_period(uint8_t vcsel_period_pclks)
-{
- /*!
- * Converts the encoded VCSEL period register value into the real period
- * in PLL clocks
- */
-
- uint8_t vcsel_period_reg = 0;
-
- vcsel_period_reg = (vcsel_period_pclks >> 1) - 1;
-
- return vcsel_period_reg;
-}
-
-
-uint32_t VL53L0X_isqrt(uint32_t num)
-{
- /*
- * Implements an integer square root
- *
- * From: http://en.wikipedia.org/wiki/Methods_of_computing_square_roots
- */
-
- uint32_t res = 0;
- uint32_t bit = 1 << 30;
- /* The second-to-top bit is set:
- * 1 << 14 for 16-bits, 1 << 30 for 32 bits */
-
- /* "bit" starts at the highest power of four <= the argument. */
- while (bit > num)
- bit >>= 2;
-
-
- while (bit != 0) {
- if (num >= res + bit) {
- num -= res + bit;
- res = (res >> 1) + bit;
- } else
- res >>= 1;
-
- bit >>= 2;
- }
-
- return res;
-}
-
-
-uint32_t VL53L0X_quadrature_sum(uint32_t a, uint32_t b)
-{
- /*
- * Implements a quadrature sum
- *
- * rea = sqrt(a^2 + b^2)
- *
- * Trap overflow case max input value is 65535 (16-bit value)
- * as internal calc are 32-bit wide
- *
- * If overflow then seta output to maximum
- */
- uint32_t res = 0;
-
- if (a > 65535 || b > 65535)
- res = 65535;
- else
- res = VL53L0X_isqrt(a * a + b * b);
-
- return res;
-}
-
-
-VL53L0X_Error VL53L0X_device_read_strobe(VL53L0X_DEV Dev)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t strobe;
- uint32_t LoopNb;
- LOG_FUNCTION_START("");
-
- Status |= VL53L0X_WrByte(Dev, 0x83, 0x00);
-
- /* polling
- * use timeout to avoid deadlock*/
- if (Status == VL53L0X_ERROR_NONE) {
- LoopNb = 0;
- do {
- Status = VL53L0X_RdByte(Dev, 0x83, &strobe);
- if ((strobe != 0x00) || Status != VL53L0X_ERROR_NONE)
- break;
-
- LoopNb = LoopNb + 1;
- } while (LoopNb < VL53L0X_DEFAULT_MAX_LOOP);
-
- if (LoopNb >= VL53L0X_DEFAULT_MAX_LOOP)
- Status = VL53L0X_ERROR_TIME_OUT;
-
- }
-
- Status |= VL53L0X_WrByte(Dev, 0x83, 0x01);
-
- LOG_FUNCTION_END(Status);
- return Status;
-
-}
-
-VL53L0X_Error VL53L0X_get_info_from_device(VL53L0X_DEV Dev, uint8_t option)
-{
-
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t byte;
- uint32_t TmpDWord;
- uint8_t ModuleId;
- uint8_t Revision;
- uint8_t ReferenceSpadCount = 0;
- uint8_t ReferenceSpadType = 0;
- uint32_t PartUIDUpper = 0;
- uint32_t PartUIDLower = 0;
- uint32_t OffsetFixed1104_mm = 0;
- int16_t OffsetMicroMeters = 0;
- uint32_t DistMeasTgtFixed1104_mm = 400 << 4;
- uint32_t DistMeasFixed1104_400_mm = 0;
- uint32_t SignalRateMeasFixed1104_400_mm = 0;
- char ProductId[19];
- char *ProductId_tmp;
- uint8_t ReadDataFromDeviceDone;
- FixPoint1616_t SignalRateMeasFixed400mmFix = 0;
- uint8_t NvmRefGoodSpadMap[VL53L0X_REF_SPAD_BUFFER_SIZE];
- int i;
-
-
- LOG_FUNCTION_START("");
-
- ReadDataFromDeviceDone = VL53L0X_GETDEVICESPECIFICPARAMETER(Dev,
- ReadDataFromDeviceDone);
-
- /* This access is done only once after that a GetDeviceInfo or
- * datainit is done*/
- if (ReadDataFromDeviceDone != 7) {
-
- Status |= VL53L0X_WrByte(Dev, 0x80, 0x01);
- Status |= VL53L0X_WrByte(Dev, 0xFF, 0x01);
- Status |= VL53L0X_WrByte(Dev, 0x00, 0x00);
-
- Status |= VL53L0X_WrByte(Dev, 0xFF, 0x06);
- Status |= VL53L0X_RdByte(Dev, 0x83, &byte);
- Status |= VL53L0X_WrByte(Dev, 0x83, byte|4);
- Status |= VL53L0X_WrByte(Dev, 0xFF, 0x07);
- Status |= VL53L0X_WrByte(Dev, 0x81, 0x01);
-
- Status |= VL53L0X_PollingDelay(Dev);
-
- Status |= VL53L0X_WrByte(Dev, 0x80, 0x01);
-
- if (((option & 1) == 1) &&
- ((ReadDataFromDeviceDone & 1) == 0)) {
- Status |= VL53L0X_WrByte(Dev, 0x94, 0x6b);
- Status |= VL53L0X_device_read_strobe(Dev);
- Status |= VL53L0X_RdDWord(Dev, 0x90, &TmpDWord);
-
- ReferenceSpadCount = (uint8_t)((TmpDWord >> 8) & 0x07f);
- ReferenceSpadType = (uint8_t)((TmpDWord >> 15) & 0x01);
-
- Status |= VL53L0X_WrByte(Dev, 0x94, 0x24);
- Status |= VL53L0X_device_read_strobe(Dev);
- Status |= VL53L0X_RdDWord(Dev, 0x90, &TmpDWord);
-
-
- NvmRefGoodSpadMap[0] = (uint8_t)((TmpDWord >> 24)
- & 0xff);
- NvmRefGoodSpadMap[1] = (uint8_t)((TmpDWord >> 16)
- & 0xff);
- NvmRefGoodSpadMap[2] = (uint8_t)((TmpDWord >> 8)
- & 0xff);
- NvmRefGoodSpadMap[3] = (uint8_t)(TmpDWord & 0xff);
-
- Status |= VL53L0X_WrByte(Dev, 0x94, 0x25);
- Status |= VL53L0X_device_read_strobe(Dev);
- Status |= VL53L0X_RdDWord(Dev, 0x90, &TmpDWord);
-
- NvmRefGoodSpadMap[4] = (uint8_t)((TmpDWord >> 24)
- & 0xff);
- NvmRefGoodSpadMap[5] = (uint8_t)((TmpDWord >> 16)
- & 0xff);
- }
-
- if (((option & 2) == 2) &&
- ((ReadDataFromDeviceDone & 2) == 0)) {
-
- Status |= VL53L0X_WrByte(Dev, 0x94, 0x02);
- Status |= VL53L0X_device_read_strobe(Dev);
- Status |= VL53L0X_RdByte(Dev, 0x90, &ModuleId);
-
- Status |= VL53L0X_WrByte(Dev, 0x94, 0x7B);
- Status |= VL53L0X_device_read_strobe(Dev);
- Status |= VL53L0X_RdByte(Dev, 0x90, &Revision);
-
- Status |= VL53L0X_WrByte(Dev, 0x94, 0x77);
- Status |= VL53L0X_device_read_strobe(Dev);
- Status |= VL53L0X_RdDWord(Dev, 0x90, &TmpDWord);
-
- ProductId[0] = (char)((TmpDWord >> 25) & 0x07f);
- ProductId[1] = (char)((TmpDWord >> 18) & 0x07f);
- ProductId[2] = (char)((TmpDWord >> 11) & 0x07f);
- ProductId[3] = (char)((TmpDWord >> 4) & 0x07f);
-
- byte = (uint8_t)((TmpDWord & 0x00f) << 3);
-
- Status |= VL53L0X_WrByte(Dev, 0x94, 0x78);
- Status |= VL53L0X_device_read_strobe(Dev);
- Status |= VL53L0X_RdDWord(Dev, 0x90, &TmpDWord);
-
- ProductId[4] = (char)(byte +
- ((TmpDWord >> 29) & 0x07f));
- ProductId[5] = (char)((TmpDWord >> 22) & 0x07f);
- ProductId[6] = (char)((TmpDWord >> 15) & 0x07f);
- ProductId[7] = (char)((TmpDWord >> 8) & 0x07f);
- ProductId[8] = (char)((TmpDWord >> 1) & 0x07f);
-
- byte = (uint8_t)((TmpDWord & 0x001) << 6);
-
- Status |= VL53L0X_WrByte(Dev, 0x94, 0x79);
-
- Status |= VL53L0X_device_read_strobe(Dev);
-
- Status |= VL53L0X_RdDWord(Dev, 0x90, &TmpDWord);
-
- ProductId[9] = (char)(byte +
- ((TmpDWord >> 26) & 0x07f));
- ProductId[10] = (char)((TmpDWord >> 19) & 0x07f);
- ProductId[11] = (char)((TmpDWord >> 12) & 0x07f);
- ProductId[12] = (char)((TmpDWord >> 5) & 0x07f);
-
- byte = (uint8_t)((TmpDWord & 0x01f) << 2);
-
- Status |= VL53L0X_WrByte(Dev, 0x94, 0x7A);
-
- Status |= VL53L0X_device_read_strobe(Dev);
-
- Status |= VL53L0X_RdDWord(Dev, 0x90, &TmpDWord);
-
- ProductId[13] = (char)(byte +
- ((TmpDWord >> 30) & 0x07f));
- ProductId[14] = (char)((TmpDWord >> 23) & 0x07f);
- ProductId[15] = (char)((TmpDWord >> 16) & 0x07f);
- ProductId[16] = (char)((TmpDWord >> 9) & 0x07f);
- ProductId[17] = (char)((TmpDWord >> 2) & 0x07f);
- ProductId[18] = '\0';
-
- }
-
- if (((option & 4) == 4) &&
- ((ReadDataFromDeviceDone & 4) == 0)) {
-
- Status |= VL53L0X_WrByte(Dev, 0x94, 0x7B);
- Status |= VL53L0X_device_read_strobe(Dev);
- Status |= VL53L0X_RdDWord(Dev, 0x90, &PartUIDUpper);
-
- Status |= VL53L0X_WrByte(Dev, 0x94, 0x7C);
- Status |= VL53L0X_device_read_strobe(Dev);
- Status |= VL53L0X_RdDWord(Dev, 0x90, &PartUIDLower);
-
- Status |= VL53L0X_WrByte(Dev, 0x94, 0x73);
- Status |= VL53L0X_device_read_strobe(Dev);
- Status |= VL53L0X_RdDWord(Dev, 0x90, &TmpDWord);
-
- SignalRateMeasFixed1104_400_mm = (TmpDWord &
- 0x000000ff) << 8;
-
- Status |= VL53L0X_WrByte(Dev, 0x94, 0x74);
- Status |= VL53L0X_device_read_strobe(Dev);
- Status |= VL53L0X_RdDWord(Dev, 0x90, &TmpDWord);
-
- SignalRateMeasFixed1104_400_mm |= ((TmpDWord &
- 0xff000000) >> 24);
-
- Status |= VL53L0X_WrByte(Dev, 0x94, 0x75);
- Status |= VL53L0X_device_read_strobe(Dev);
- Status |= VL53L0X_RdDWord(Dev, 0x90, &TmpDWord);
-
- DistMeasFixed1104_400_mm = (TmpDWord & 0x000000ff)
- << 8;
-
- Status |= VL53L0X_WrByte(Dev, 0x94, 0x76);
- Status |= VL53L0X_device_read_strobe(Dev);
- Status |= VL53L0X_RdDWord(Dev, 0x90, &TmpDWord);
-
- DistMeasFixed1104_400_mm |= ((TmpDWord & 0xff000000)
- >> 24);
- }
-
- Status |= VL53L0X_WrByte(Dev, 0x81, 0x00);
- Status |= VL53L0X_WrByte(Dev, 0xFF, 0x06);
- Status |= VL53L0X_RdByte(Dev, 0x83, &byte);
- Status |= VL53L0X_WrByte(Dev, 0x83, byte&0xfb);
- Status |= VL53L0X_WrByte(Dev, 0xFF, 0x01);
- Status |= VL53L0X_WrByte(Dev, 0x00, 0x01);
-
- Status |= VL53L0X_WrByte(Dev, 0xFF, 0x00);
- Status |= VL53L0X_WrByte(Dev, 0x80, 0x00);
- }
-
- if ((Status == VL53L0X_ERROR_NONE) &&
- (ReadDataFromDeviceDone != 7)) {
- /* Assign to variable if status is ok */
- if (((option & 1) == 1) &&
- ((ReadDataFromDeviceDone & 1) == 0)) {
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev,
- ReferenceSpadCount, ReferenceSpadCount);
-
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev,
- ReferenceSpadType, ReferenceSpadType);
-
- for (i = 0; i < VL53L0X_REF_SPAD_BUFFER_SIZE; i++) {
- Dev->Data.SpadData.RefGoodSpadMap[i] =
- NvmRefGoodSpadMap[i];
- }
- }
-
- if (((option & 2) == 2) &&
- ((ReadDataFromDeviceDone & 2) == 0)) {
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev,
- ModuleId, ModuleId);
-
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev,
- Revision, Revision);
-
- ProductId_tmp = VL53L0X_GETDEVICESPECIFICPARAMETER(Dev,
- ProductId);
- VL53L0X_COPYSTRING(ProductId_tmp, ProductId);
-
- }
-
- if (((option & 4) == 4) &&
- ((ReadDataFromDeviceDone & 4) == 0)) {
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev,
- PartUIDUpper, PartUIDUpper);
-
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev,
- PartUIDLower, PartUIDLower);
-
- SignalRateMeasFixed400mmFix =
- VL53L0X_FIXPOINT97TOFIXPOINT1616(
- SignalRateMeasFixed1104_400_mm);
-
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev,
- SignalRateMeasFixed400mm,
- SignalRateMeasFixed400mmFix);
-
- OffsetMicroMeters = 0;
- if (DistMeasFixed1104_400_mm != 0) {
- OffsetFixed1104_mm =
- DistMeasFixed1104_400_mm -
- DistMeasTgtFixed1104_mm;
- OffsetMicroMeters = (OffsetFixed1104_mm
- * 1000) >> 4;
- OffsetMicroMeters *= -1;
- }
-
- PALDevDataSet(Dev,
- Part2PartOffsetAdjustmentNVMMicroMeter,
- OffsetMicroMeters);
- }
- byte = (uint8_t)(ReadDataFromDeviceDone|option);
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev, ReadDataFromDeviceDone,
- byte);
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-
-uint32_t VL53L0X_calc_macro_period_ps(VL53L0X_DEV Dev, uint8_t vcsel_period_pclks)
-{
- uint64_t PLL_period_ps;
- uint32_t macro_period_vclks;
- uint32_t macro_period_ps;
-
- LOG_FUNCTION_START("");
-
- /* The above calculation will produce rounding errors,
- therefore set fixed value
- */
- PLL_period_ps = 1655;
-
- macro_period_vclks = 2304;
- macro_period_ps = (uint32_t)(macro_period_vclks
- * vcsel_period_pclks * PLL_period_ps);
-
- LOG_FUNCTION_END("");
- return macro_period_ps;
-}
-
-uint16_t VL53L0X_encode_timeout(uint32_t timeout_macro_clks)
-{
- /*!
- * Encode timeout in macro periods in (LSByte * 2^MSByte) + 1 format
- */
-
- uint16_t encoded_timeout = 0;
- uint32_t ls_byte = 0;
- uint16_t ms_byte = 0;
-
- if (timeout_macro_clks > 0) {
- ls_byte = timeout_macro_clks - 1;
-
- while ((ls_byte & 0xFFFFFF00) > 0) {
- ls_byte = ls_byte >> 1;
- ms_byte++;
- }
-
- encoded_timeout = (ms_byte << 8)
- + (uint16_t) (ls_byte & 0x000000FF);
- }
-
- return encoded_timeout;
-
-}
-
-uint32_t VL53L0X_decode_timeout(uint16_t encoded_timeout)
-{
- /*!
- * Decode 16-bit timeout register value - format (LSByte * 2^MSByte) + 1
- */
-
- uint32_t timeout_macro_clks = 0;
-
- timeout_macro_clks = ((uint32_t) (encoded_timeout & 0x00FF)
- << (uint32_t) ((encoded_timeout & 0xFF00) >> 8)) + 1;
-
- return timeout_macro_clks;
-}
-
-
-/* To convert ms into register value */
-uint32_t VL53L0X_calc_timeout_mclks(VL53L0X_DEV Dev,
- uint32_t timeout_period_us,
- uint8_t vcsel_period_pclks)
-{
- uint32_t macro_period_ps;
- uint32_t macro_period_ns;
- uint32_t timeout_period_mclks = 0;
-
- macro_period_ps = VL53L0X_calc_macro_period_ps(Dev, vcsel_period_pclks);
- macro_period_ns = (macro_period_ps + 500) / 1000;
-
- timeout_period_mclks =
- (uint32_t) (((timeout_period_us * 1000)
- + (macro_period_ns / 2)) / macro_period_ns);
-
- return timeout_period_mclks;
-}
-
-/* To convert register value into us */
-uint32_t VL53L0X_calc_timeout_us(VL53L0X_DEV Dev,
- uint16_t timeout_period_mclks,
- uint8_t vcsel_period_pclks)
-{
- uint32_t macro_period_ps;
- uint32_t macro_period_ns;
- uint32_t actual_timeout_period_us = 0;
-
- macro_period_ps = VL53L0X_calc_macro_period_ps(Dev, vcsel_period_pclks);
- macro_period_ns = (macro_period_ps + 500) / 1000;
-
- actual_timeout_period_us =
- ((timeout_period_mclks * macro_period_ns)
- + (macro_period_ns / 2)) / 1000;
-
- return actual_timeout_period_us;
-}
-
-
-VL53L0X_Error get_sequence_step_timeout(VL53L0X_DEV Dev,
- VL53L0X_SequenceStepId SequenceStepId,
- uint32_t *pTimeOutMicroSecs)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t CurrentVCSELPulsePeriodPClk;
- uint8_t EncodedTimeOutByte = 0;
- uint32_t TimeoutMicroSeconds = 0;
- uint16_t PreRangeEncodedTimeOut = 0;
- uint16_t MsrcTimeOutMClks;
- uint16_t PreRangeTimeOutMClks;
- uint16_t FinalRangeTimeOutMClks = 0;
- uint16_t FinalRangeEncodedTimeOut;
- VL53L0X_SchedulerSequenceSteps_t SchedulerSequenceSteps;
-
- if ((SequenceStepId == VL53L0X_SEQUENCESTEP_TCC) ||
- (SequenceStepId == VL53L0X_SEQUENCESTEP_DSS) ||
- (SequenceStepId == VL53L0X_SEQUENCESTEP_MSRC)) {
-
- Status = VL53L0X_GetVcselPulsePeriod(Dev,
- VL53L0X_VCSEL_PERIOD_PRE_RANGE,
- &CurrentVCSELPulsePeriodPClk);
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_RdByte(Dev,
- VL53L0X_REG_MSRC_CONFIG_TIMEOUT_MACROP,
- &EncodedTimeOutByte);
- }
- MsrcTimeOutMClks = VL53L0X_decode_timeout(EncodedTimeOutByte);
-
- TimeoutMicroSeconds = VL53L0X_calc_timeout_us(Dev,
- MsrcTimeOutMClks,
- CurrentVCSELPulsePeriodPClk);
- } else if (SequenceStepId == VL53L0X_SEQUENCESTEP_PRE_RANGE) {
- /* Retrieve PRE-RANGE VCSEL Period */
- Status = VL53L0X_GetVcselPulsePeriod(Dev,
- VL53L0X_VCSEL_PERIOD_PRE_RANGE,
- &CurrentVCSELPulsePeriodPClk);
-
- /* Retrieve PRE-RANGE Timeout in Macro periods (MCLKS) */
- if (Status == VL53L0X_ERROR_NONE) {
-
- /* Retrieve PRE-RANGE VCSEL Period */
- Status = VL53L0X_GetVcselPulsePeriod(Dev,
- VL53L0X_VCSEL_PERIOD_PRE_RANGE,
- &CurrentVCSELPulsePeriodPClk);
-
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_RdWord(Dev,
- VL53L0X_REG_PRE_RANGE_CONFIG_TIMEOUT_MACROP_HI,
- &PreRangeEncodedTimeOut);
- }
-
- PreRangeTimeOutMClks = VL53L0X_decode_timeout(
- PreRangeEncodedTimeOut);
-
- TimeoutMicroSeconds = VL53L0X_calc_timeout_us(Dev,
- PreRangeTimeOutMClks,
- CurrentVCSELPulsePeriodPClk);
- }
- } else if (SequenceStepId == VL53L0X_SEQUENCESTEP_FINAL_RANGE) {
-
- VL53L0X_GetSequenceStepEnables(Dev, &SchedulerSequenceSteps);
- PreRangeTimeOutMClks = 0;
-
- if (SchedulerSequenceSteps.PreRangeOn) {
- /* Retrieve PRE-RANGE VCSEL Period */
- Status = VL53L0X_GetVcselPulsePeriod(Dev,
- VL53L0X_VCSEL_PERIOD_PRE_RANGE,
- &CurrentVCSELPulsePeriodPClk);
-
- /* Retrieve PRE-RANGE Timeout in Macro periods
- * (MCLKS) */
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_RdWord(Dev,
- VL53L0X_REG_PRE_RANGE_CONFIG_TIMEOUT_MACROP_HI,
- &PreRangeEncodedTimeOut);
- PreRangeTimeOutMClks = VL53L0X_decode_timeout(
- PreRangeEncodedTimeOut);
- }
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- /* Retrieve FINAL-RANGE VCSEL Period */
- Status = VL53L0X_GetVcselPulsePeriod(Dev,
- VL53L0X_VCSEL_PERIOD_FINAL_RANGE,
- &CurrentVCSELPulsePeriodPClk);
- }
-
- /* Retrieve FINAL-RANGE Timeout in Macro periods (MCLKS) */
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_RdWord(Dev,
- VL53L0X_REG_FINAL_RANGE_CONFIG_TIMEOUT_MACROP_HI,
- &FinalRangeEncodedTimeOut);
- FinalRangeTimeOutMClks = VL53L0X_decode_timeout(
- FinalRangeEncodedTimeOut);
- }
-
- FinalRangeTimeOutMClks -= PreRangeTimeOutMClks;
- TimeoutMicroSeconds = VL53L0X_calc_timeout_us(Dev,
- FinalRangeTimeOutMClks,
- CurrentVCSELPulsePeriodPClk);
- }
-
- *pTimeOutMicroSecs = TimeoutMicroSeconds;
-
- return Status;
-}
-
-
-VL53L0X_Error set_sequence_step_timeout(VL53L0X_DEV Dev,
- VL53L0X_SequenceStepId SequenceStepId,
- uint32_t TimeOutMicroSecs)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t CurrentVCSELPulsePeriodPClk;
- uint8_t MsrcEncodedTimeOut;
- uint16_t PreRangeEncodedTimeOut;
- uint16_t PreRangeTimeOutMClks;
- uint16_t MsrcRangeTimeOutMClks;
- uint16_t FinalRangeTimeOutMClks;
- uint16_t FinalRangeEncodedTimeOut;
- VL53L0X_SchedulerSequenceSteps_t SchedulerSequenceSteps;
-
- if ((SequenceStepId == VL53L0X_SEQUENCESTEP_TCC) ||
- (SequenceStepId == VL53L0X_SEQUENCESTEP_DSS) ||
- (SequenceStepId == VL53L0X_SEQUENCESTEP_MSRC)) {
-
- Status = VL53L0X_GetVcselPulsePeriod(Dev,
- VL53L0X_VCSEL_PERIOD_PRE_RANGE,
- &CurrentVCSELPulsePeriodPClk);
-
- if (Status == VL53L0X_ERROR_NONE) {
- MsrcRangeTimeOutMClks = VL53L0X_calc_timeout_mclks(Dev,
- TimeOutMicroSecs,
- (uint8_t)CurrentVCSELPulsePeriodPClk);
-
- if (MsrcRangeTimeOutMClks > 256)
- MsrcEncodedTimeOut = 255;
- else
- MsrcEncodedTimeOut =
- (uint8_t)MsrcRangeTimeOutMClks - 1;
-
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev,
- LastEncodedTimeout,
- MsrcEncodedTimeOut);
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_MSRC_CONFIG_TIMEOUT_MACROP,
- MsrcEncodedTimeOut);
- }
- } else {
-
- if (SequenceStepId == VL53L0X_SEQUENCESTEP_PRE_RANGE) {
-
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_GetVcselPulsePeriod(Dev,
- VL53L0X_VCSEL_PERIOD_PRE_RANGE,
- &CurrentVCSELPulsePeriodPClk);
- PreRangeTimeOutMClks =
- VL53L0X_calc_timeout_mclks(Dev,
- TimeOutMicroSecs,
- (uint8_t)CurrentVCSELPulsePeriodPClk);
- PreRangeEncodedTimeOut = VL53L0X_encode_timeout(
- PreRangeTimeOutMClks);
-
- VL53L0X_SETDEVICESPECIFICPARAMETER(Dev,
- LastEncodedTimeout,
- PreRangeEncodedTimeOut);
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_WrWord(Dev,
- VL53L0X_REG_PRE_RANGE_CONFIG_TIMEOUT_MACROP_HI,
- PreRangeEncodedTimeOut);
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- VL53L0X_SETDEVICESPECIFICPARAMETER(
- Dev,
- PreRangeTimeoutMicroSecs,
- TimeOutMicroSecs);
- }
- } else if (SequenceStepId == VL53L0X_SEQUENCESTEP_FINAL_RANGE) {
-
- /* For the final range timeout, the pre-range timeout
- * must be added. To do this both final and pre-range
- * timeouts must be expressed in macro periods MClks
- * because they have different vcsel periods.
- */
-
- VL53L0X_GetSequenceStepEnables(Dev,
- &SchedulerSequenceSteps);
- PreRangeTimeOutMClks = 0;
- if (SchedulerSequenceSteps.PreRangeOn) {
-
- /* Retrieve PRE-RANGE VCSEL Period */
- Status = VL53L0X_GetVcselPulsePeriod(Dev,
- VL53L0X_VCSEL_PERIOD_PRE_RANGE,
- &CurrentVCSELPulsePeriodPClk);
-
- /* Retrieve PRE-RANGE Timeout in Macro periods
- * (MCLKS) */
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_RdWord(Dev, 0x51,
- &PreRangeEncodedTimeOut);
- PreRangeTimeOutMClks =
- VL53L0X_decode_timeout(
- PreRangeEncodedTimeOut);
- }
- }
-
- /* Calculate FINAL RANGE Timeout in Macro Periods
- * (MCLKS) and add PRE-RANGE value
- */
- if (Status == VL53L0X_ERROR_NONE) {
-
- Status = VL53L0X_GetVcselPulsePeriod(Dev,
- VL53L0X_VCSEL_PERIOD_FINAL_RANGE,
- &CurrentVCSELPulsePeriodPClk);
- }
- if (Status == VL53L0X_ERROR_NONE) {
-
- FinalRangeTimeOutMClks =
- VL53L0X_calc_timeout_mclks(Dev,
- TimeOutMicroSecs,
- (uint8_t) CurrentVCSELPulsePeriodPClk);
-
- FinalRangeTimeOutMClks += PreRangeTimeOutMClks;
-
- FinalRangeEncodedTimeOut =
- VL53L0X_encode_timeout(FinalRangeTimeOutMClks);
-
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_WrWord(Dev, 0x71,
- FinalRangeEncodedTimeOut);
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- VL53L0X_SETDEVICESPECIFICPARAMETER(
- Dev,
- FinalRangeTimeoutMicroSecs,
- TimeOutMicroSecs);
- }
- }
- } else
- Status = VL53L0X_ERROR_INVALID_PARAMS;
-
- }
- return Status;
-}
-
-VL53L0X_Error VL53L0X_set_vcsel_pulse_period(VL53L0X_DEV Dev,
- VL53L0X_VcselPeriod VcselPeriodType, uint8_t VCSELPulsePeriodPCLK)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t vcsel_period_reg;
- uint8_t MinPreVcselPeriodPCLK = 12;
- uint8_t MaxPreVcselPeriodPCLK = 18;
- uint8_t MinFinalVcselPeriodPCLK = 8;
- uint8_t MaxFinalVcselPeriodPCLK = 14;
- uint32_t MeasurementTimingBudgetMicroSeconds;
- uint32_t FinalRangeTimeoutMicroSeconds;
- uint32_t PreRangeTimeoutMicroSeconds;
- uint32_t MsrcTimeoutMicroSeconds;
- uint8_t PhaseCalInt = 0;
-
- /* Check if valid clock period requested */
-
- if ((VCSELPulsePeriodPCLK % 2) != 0) {
- /* Value must be an even number */
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- } else if (VcselPeriodType == VL53L0X_VCSEL_PERIOD_PRE_RANGE &&
- (VCSELPulsePeriodPCLK < MinPreVcselPeriodPCLK ||
- VCSELPulsePeriodPCLK > MaxPreVcselPeriodPCLK)) {
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- } else if (VcselPeriodType == VL53L0X_VCSEL_PERIOD_FINAL_RANGE &&
- (VCSELPulsePeriodPCLK < MinFinalVcselPeriodPCLK ||
- VCSELPulsePeriodPCLK > MaxFinalVcselPeriodPCLK)) {
-
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- }
-
- /* Apply specific settings for the requested clock period */
-
- if (Status != VL53L0X_ERROR_NONE)
- return Status;
-
-
- if (VcselPeriodType == VL53L0X_VCSEL_PERIOD_PRE_RANGE) {
-
- /* Set phase check limits */
- if (VCSELPulsePeriodPCLK == 12) {
-
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_PRE_RANGE_CONFIG_VALID_PHASE_HIGH,
- 0x18);
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_PRE_RANGE_CONFIG_VALID_PHASE_LOW,
- 0x08);
- } else if (VCSELPulsePeriodPCLK == 14) {
-
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_PRE_RANGE_CONFIG_VALID_PHASE_HIGH,
- 0x30);
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_PRE_RANGE_CONFIG_VALID_PHASE_LOW,
- 0x08);
- } else if (VCSELPulsePeriodPCLK == 16) {
-
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_PRE_RANGE_CONFIG_VALID_PHASE_HIGH,
- 0x40);
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_PRE_RANGE_CONFIG_VALID_PHASE_LOW,
- 0x08);
- } else if (VCSELPulsePeriodPCLK == 18) {
-
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_PRE_RANGE_CONFIG_VALID_PHASE_HIGH,
- 0x50);
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_PRE_RANGE_CONFIG_VALID_PHASE_LOW,
- 0x08);
- }
- } else if (VcselPeriodType == VL53L0X_VCSEL_PERIOD_FINAL_RANGE) {
-
- if (VCSELPulsePeriodPCLK == 8) {
-
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_FINAL_RANGE_CONFIG_VALID_PHASE_HIGH,
- 0x10);
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_FINAL_RANGE_CONFIG_VALID_PHASE_LOW,
- 0x08);
-
- Status |= VL53L0X_WrByte(Dev,
- VL53L0X_REG_GLOBAL_CONFIG_VCSEL_WIDTH, 0x02);
- Status |= VL53L0X_WrByte(Dev,
- VL53L0X_REG_ALGO_PHASECAL_CONFIG_TIMEOUT, 0x0C);
-
- Status |= VL53L0X_WrByte(Dev, 0xff, 0x01);
- Status |= VL53L0X_WrByte(Dev,
- VL53L0X_REG_ALGO_PHASECAL_LIM,
- 0x30);
- Status |= VL53L0X_WrByte(Dev, 0xff, 0x00);
- } else if (VCSELPulsePeriodPCLK == 10) {
-
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_FINAL_RANGE_CONFIG_VALID_PHASE_HIGH,
- 0x28);
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_FINAL_RANGE_CONFIG_VALID_PHASE_LOW,
- 0x08);
-
- Status |= VL53L0X_WrByte(Dev,
- VL53L0X_REG_GLOBAL_CONFIG_VCSEL_WIDTH, 0x03);
- Status |= VL53L0X_WrByte(Dev,
- VL53L0X_REG_ALGO_PHASECAL_CONFIG_TIMEOUT, 0x09);
-
- Status |= VL53L0X_WrByte(Dev, 0xff, 0x01);
- Status |= VL53L0X_WrByte(Dev,
- VL53L0X_REG_ALGO_PHASECAL_LIM,
- 0x20);
- Status |= VL53L0X_WrByte(Dev, 0xff, 0x00);
- } else if (VCSELPulsePeriodPCLK == 12) {
-
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_FINAL_RANGE_CONFIG_VALID_PHASE_HIGH,
- 0x38);
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_FINAL_RANGE_CONFIG_VALID_PHASE_LOW,
- 0x08);
-
- Status |= VL53L0X_WrByte(Dev,
- VL53L0X_REG_GLOBAL_CONFIG_VCSEL_WIDTH, 0x03);
- Status |= VL53L0X_WrByte(Dev,
- VL53L0X_REG_ALGO_PHASECAL_CONFIG_TIMEOUT, 0x08);
-
- Status |= VL53L0X_WrByte(Dev, 0xff, 0x01);
- Status |= VL53L0X_WrByte(Dev,
- VL53L0X_REG_ALGO_PHASECAL_LIM,
- 0x20);
- Status |= VL53L0X_WrByte(Dev, 0xff, 0x00);
- } else if (VCSELPulsePeriodPCLK == 14) {
-
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_FINAL_RANGE_CONFIG_VALID_PHASE_HIGH,
- 0x048);
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_FINAL_RANGE_CONFIG_VALID_PHASE_LOW,
- 0x08);
-
- Status |= VL53L0X_WrByte(Dev,
- VL53L0X_REG_GLOBAL_CONFIG_VCSEL_WIDTH, 0x03);
- Status |= VL53L0X_WrByte(Dev,
- VL53L0X_REG_ALGO_PHASECAL_CONFIG_TIMEOUT, 0x07);
-
- Status |= VL53L0X_WrByte(Dev, 0xff, 0x01);
- Status |= VL53L0X_WrByte(Dev,
- VL53L0X_REG_ALGO_PHASECAL_LIM,
- 0x20);
- Status |= VL53L0X_WrByte(Dev, 0xff, 0x00);
- }
- }
-
-
- /* Re-calculate and apply timeouts, in macro periods */
-
- if (Status == VL53L0X_ERROR_NONE) {
- vcsel_period_reg = VL53L0X_encode_vcsel_period((uint8_t)
- VCSELPulsePeriodPCLK);
-
- /* When the VCSEL period for the pre or final range is changed,
- * the corresponding timeout must be read from the device using
- * the current VCSEL period, then the new VCSEL period can be
- * applied. The timeout then must be written back to the device
- * using the new VCSEL period.
- *
- * For the MSRC timeout, the same applies - this timeout being
- * dependent on the pre-range vcsel period.
- */
- switch (VcselPeriodType) {
- case VL53L0X_VCSEL_PERIOD_PRE_RANGE:
- Status = get_sequence_step_timeout(Dev,
- VL53L0X_SEQUENCESTEP_PRE_RANGE,
- &PreRangeTimeoutMicroSeconds);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = get_sequence_step_timeout(Dev,
- VL53L0X_SEQUENCESTEP_MSRC,
- &MsrcTimeoutMicroSeconds);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_PRE_RANGE_CONFIG_VCSEL_PERIOD,
- vcsel_period_reg);
-
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = set_sequence_step_timeout(Dev,
- VL53L0X_SEQUENCESTEP_PRE_RANGE,
- PreRangeTimeoutMicroSeconds);
-
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = set_sequence_step_timeout(Dev,
- VL53L0X_SEQUENCESTEP_MSRC,
- MsrcTimeoutMicroSeconds);
-
- VL53L0X_SETDEVICESPECIFICPARAMETER(
- Dev,
- PreRangeVcselPulsePeriod,
- VCSELPulsePeriodPCLK);
- break;
- case VL53L0X_VCSEL_PERIOD_FINAL_RANGE:
- Status = get_sequence_step_timeout(Dev,
- VL53L0X_SEQUENCESTEP_FINAL_RANGE,
- &FinalRangeTimeoutMicroSeconds);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_WrByte(Dev,
- VL53L0X_REG_FINAL_RANGE_CONFIG_VCSEL_PERIOD,
- vcsel_period_reg);
-
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = set_sequence_step_timeout(Dev,
- VL53L0X_SEQUENCESTEP_FINAL_RANGE,
- FinalRangeTimeoutMicroSeconds);
-
- VL53L0X_SETDEVICESPECIFICPARAMETER(
- Dev,
- FinalRangeVcselPulsePeriod,
- VCSELPulsePeriodPCLK);
- break;
- default:
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- }
- }
-
- /* Finally, the timing budget must be re-applied */
- if (Status == VL53L0X_ERROR_NONE) {
- VL53L0X_GETPARAMETERFIELD(Dev,
- MeasurementTimingBudgetMicroSeconds,
- MeasurementTimingBudgetMicroSeconds);
-
- Status = VL53L0X_SetMeasurementTimingBudgetMicroSeconds(Dev,
- MeasurementTimingBudgetMicroSeconds);
- }
-
- /* Perform the phase calibration. This is needed after changing on
- * vcsel period.
- * get_data_enable = 0, restore_config = 1 */
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_perform_phase_calibration(
- Dev, &PhaseCalInt, 0, 1);
-
- return Status;
-}
-
-VL53L0X_Error VL53L0X_get_vcsel_pulse_period(VL53L0X_DEV Dev,
- VL53L0X_VcselPeriod VcselPeriodType, uint8_t *pVCSELPulsePeriodPCLK)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t vcsel_period_reg;
-
- switch (VcselPeriodType) {
- case VL53L0X_VCSEL_PERIOD_PRE_RANGE:
- Status = VL53L0X_RdByte(Dev,
- VL53L0X_REG_PRE_RANGE_CONFIG_VCSEL_PERIOD,
- &vcsel_period_reg);
- break;
- case VL53L0X_VCSEL_PERIOD_FINAL_RANGE:
- Status = VL53L0X_RdByte(Dev,
- VL53L0X_REG_FINAL_RANGE_CONFIG_VCSEL_PERIOD,
- &vcsel_period_reg);
- break;
- default:
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- }
-
- if (Status == VL53L0X_ERROR_NONE)
- *pVCSELPulsePeriodPCLK =
- VL53L0X_decode_vcsel_period(vcsel_period_reg);
-
- return Status;
-}
-
-
-
-VL53L0X_Error VL53L0X_set_measurement_timing_budget_micro_seconds(VL53L0X_DEV Dev,
- uint32_t MeasurementTimingBudgetMicroSeconds)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint32_t FinalRangeTimingBudgetMicroSeconds;
- VL53L0X_SchedulerSequenceSteps_t SchedulerSequenceSteps;
- uint32_t MsrcDccTccTimeoutMicroSeconds = 2000;
- uint32_t StartOverheadMicroSeconds = 1320;
- uint32_t EndOverheadMicroSeconds = 960;
- uint32_t MsrcOverheadMicroSeconds = 660;
- uint32_t TccOverheadMicroSeconds = 590;
- uint32_t DssOverheadMicroSeconds = 690;
- uint32_t PreRangeOverheadMicroSeconds = 660;
- uint32_t FinalRangeOverheadMicroSeconds = 550;
- uint32_t PreRangeTimeoutMicroSeconds = 0;
- uint32_t cMinTimingBudgetMicroSeconds = 20000;
- uint32_t SubTimeout = 0;
-
- LOG_FUNCTION_START("");
-
- if (MeasurementTimingBudgetMicroSeconds
- < cMinTimingBudgetMicroSeconds) {
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- return Status;
- }
-
- FinalRangeTimingBudgetMicroSeconds =
- MeasurementTimingBudgetMicroSeconds -
- (StartOverheadMicroSeconds + EndOverheadMicroSeconds);
-
- Status = VL53L0X_GetSequenceStepEnables(Dev, &SchedulerSequenceSteps);
-
- if (Status == VL53L0X_ERROR_NONE &&
- (SchedulerSequenceSteps.TccOn ||
- SchedulerSequenceSteps.MsrcOn ||
- SchedulerSequenceSteps.DssOn)) {
-
- /* TCC, MSRC and DSS all share the same timeout */
- Status = get_sequence_step_timeout(Dev,
- VL53L0X_SEQUENCESTEP_MSRC,
- &MsrcDccTccTimeoutMicroSeconds);
-
- /* Subtract the TCC, MSRC and DSS timeouts if they are
- * enabled. */
-
- if (Status != VL53L0X_ERROR_NONE)
- return Status;
-
- /* TCC */
- if (SchedulerSequenceSteps.TccOn) {
-
- SubTimeout = MsrcDccTccTimeoutMicroSeconds
- + TccOverheadMicroSeconds;
-
- if (SubTimeout <
- FinalRangeTimingBudgetMicroSeconds) {
- FinalRangeTimingBudgetMicroSeconds -=
- SubTimeout;
- } else {
- /* Requested timeout too big. */
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- }
- }
-
- if (Status != VL53L0X_ERROR_NONE) {
- LOG_FUNCTION_END(Status);
- return Status;
- }
-
- /* DSS */
- if (SchedulerSequenceSteps.DssOn) {
-
- SubTimeout = 2 * (MsrcDccTccTimeoutMicroSeconds +
- DssOverheadMicroSeconds);
-
- if (SubTimeout < FinalRangeTimingBudgetMicroSeconds) {
- FinalRangeTimingBudgetMicroSeconds
- -= SubTimeout;
- } else {
- /* Requested timeout too big. */
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- }
- } else if (SchedulerSequenceSteps.MsrcOn) {
- /* MSRC */
- SubTimeout = MsrcDccTccTimeoutMicroSeconds +
- MsrcOverheadMicroSeconds;
-
- if (SubTimeout < FinalRangeTimingBudgetMicroSeconds) {
- FinalRangeTimingBudgetMicroSeconds
- -= SubTimeout;
- } else {
- /* Requested timeout too big. */
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- }
- }
-
- }
-
- if (Status != VL53L0X_ERROR_NONE) {
- LOG_FUNCTION_END(Status);
- return Status;
- }
-
- if (SchedulerSequenceSteps.PreRangeOn) {
-
- /* Subtract the Pre-range timeout if enabled. */
-
- Status = get_sequence_step_timeout(Dev,
- VL53L0X_SEQUENCESTEP_PRE_RANGE,
- &PreRangeTimeoutMicroSeconds);
-
- SubTimeout = PreRangeTimeoutMicroSeconds +
- PreRangeOverheadMicroSeconds;
-
- if (SubTimeout < FinalRangeTimingBudgetMicroSeconds) {
- FinalRangeTimingBudgetMicroSeconds -= SubTimeout;
- } else {
- /* Requested timeout too big. */
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- }
- }
-
-
- if (Status == VL53L0X_ERROR_NONE &&
- SchedulerSequenceSteps.FinalRangeOn) {
-
- FinalRangeTimingBudgetMicroSeconds -=
- FinalRangeOverheadMicroSeconds;
-
- /* Final Range Timeout
- * Note that the final range timeout is determined by the timing
- * budget and the sum of all other timeouts within the sequence.
- * If there is no room for the final range timeout, then an error
- * will be set. Otherwise the remaining time will be applied to
- * the final range.
- */
- Status = set_sequence_step_timeout(Dev,
- VL53L0X_SEQUENCESTEP_FINAL_RANGE,
- FinalRangeTimingBudgetMicroSeconds);
-
- VL53L0X_SETPARAMETERFIELD(Dev,
- MeasurementTimingBudgetMicroSeconds,
- MeasurementTimingBudgetMicroSeconds);
- }
-
- LOG_FUNCTION_END(Status);
-
- return Status;
-}
-
-VL53L0X_Error VL53L0X_get_measurement_timing_budget_micro_seconds(VL53L0X_DEV Dev,
- uint32_t *pMeasurementTimingBudgetMicroSeconds)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- VL53L0X_SchedulerSequenceSteps_t SchedulerSequenceSteps;
- uint32_t FinalRangeTimeoutMicroSeconds;
- uint32_t MsrcDccTccTimeoutMicroSeconds = 2000;
- uint32_t StartOverheadMicroSeconds = 1910;
- uint32_t EndOverheadMicroSeconds = 960;
- uint32_t MsrcOverheadMicroSeconds = 660;
- uint32_t TccOverheadMicroSeconds = 590;
- uint32_t DssOverheadMicroSeconds = 690;
- uint32_t PreRangeOverheadMicroSeconds = 660;
- uint32_t FinalRangeOverheadMicroSeconds = 550;
- uint32_t PreRangeTimeoutMicroSeconds = 0;
-
- LOG_FUNCTION_START("");
-
- /* Start and end overhead times always present */
- *pMeasurementTimingBudgetMicroSeconds
- = StartOverheadMicroSeconds + EndOverheadMicroSeconds;
-
- Status = VL53L0X_GetSequenceStepEnables(Dev, &SchedulerSequenceSteps);
-
- if (Status != VL53L0X_ERROR_NONE) {
- LOG_FUNCTION_END(Status);
- return Status;
- }
-
-
- if (SchedulerSequenceSteps.TccOn ||
- SchedulerSequenceSteps.MsrcOn ||
- SchedulerSequenceSteps.DssOn) {
-
- Status = get_sequence_step_timeout(Dev,
- VL53L0X_SEQUENCESTEP_MSRC,
- &MsrcDccTccTimeoutMicroSeconds);
-
- if (Status == VL53L0X_ERROR_NONE) {
- if (SchedulerSequenceSteps.TccOn) {
- *pMeasurementTimingBudgetMicroSeconds +=
- MsrcDccTccTimeoutMicroSeconds +
- TccOverheadMicroSeconds;
- }
-
- if (SchedulerSequenceSteps.DssOn) {
- *pMeasurementTimingBudgetMicroSeconds +=
- 2 * (MsrcDccTccTimeoutMicroSeconds +
- DssOverheadMicroSeconds);
- } else if (SchedulerSequenceSteps.MsrcOn) {
- *pMeasurementTimingBudgetMicroSeconds +=
- MsrcDccTccTimeoutMicroSeconds +
- MsrcOverheadMicroSeconds;
- }
- }
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- if (SchedulerSequenceSteps.PreRangeOn) {
- Status = get_sequence_step_timeout(Dev,
- VL53L0X_SEQUENCESTEP_PRE_RANGE,
- &PreRangeTimeoutMicroSeconds);
- *pMeasurementTimingBudgetMicroSeconds +=
- PreRangeTimeoutMicroSeconds +
- PreRangeOverheadMicroSeconds;
- }
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- if (SchedulerSequenceSteps.FinalRangeOn) {
- Status = get_sequence_step_timeout(Dev,
- VL53L0X_SEQUENCESTEP_FINAL_RANGE,
- &FinalRangeTimeoutMicroSeconds);
- *pMeasurementTimingBudgetMicroSeconds +=
- (FinalRangeTimeoutMicroSeconds +
- FinalRangeOverheadMicroSeconds);
- }
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- VL53L0X_SETPARAMETERFIELD(Dev,
- MeasurementTimingBudgetMicroSeconds,
- *pMeasurementTimingBudgetMicroSeconds);
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-
-
-VL53L0X_Error VL53L0X_load_tuning_settings(VL53L0X_DEV Dev,
- uint8_t *pTuningSettingBuffer)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- int i;
- int Index;
- uint8_t msb;
- uint8_t lsb;
- uint8_t SelectParam;
- uint8_t NumberOfWrites;
- uint8_t Address;
- uint8_t localBuffer[4]; /* max */
- uint16_t Temp16;
-
- LOG_FUNCTION_START("");
-
- Index = 0;
-
- while ((*(pTuningSettingBuffer + Index) != 0) &&
- (Status == VL53L0X_ERROR_NONE)) {
- NumberOfWrites = *(pTuningSettingBuffer + Index);
- Index++;
- if (NumberOfWrites == 0xFF) {
- /* internal parameters */
- SelectParam = *(pTuningSettingBuffer + Index);
- Index++;
- switch (SelectParam) {
- case 0: /* uint16_t SigmaEstRefArray -> 2 bytes */
- msb = *(pTuningSettingBuffer + Index);
- Index++;
- lsb = *(pTuningSettingBuffer + Index);
- Index++;
- Temp16 = VL53L0X_MAKEUINT16(lsb, msb);
- PALDevDataSet(Dev, SigmaEstRefArray, Temp16);
- break;
- case 1: /* uint16_t SigmaEstEffPulseWidth -> 2 bytes */
- msb = *(pTuningSettingBuffer + Index);
- Index++;
- lsb = *(pTuningSettingBuffer + Index);
- Index++;
- Temp16 = VL53L0X_MAKEUINT16(lsb, msb);
- PALDevDataSet(Dev, SigmaEstEffPulseWidth,
- Temp16);
- break;
- case 2: /* uint16_t SigmaEstEffAmbWidth -> 2 bytes */
- msb = *(pTuningSettingBuffer + Index);
- Index++;
- lsb = *(pTuningSettingBuffer + Index);
- Index++;
- Temp16 = VL53L0X_MAKEUINT16(lsb, msb);
- PALDevDataSet(Dev, SigmaEstEffAmbWidth, Temp16);
- break;
- case 3: /* uint16_t targetRefRate -> 2 bytes */
- msb = *(pTuningSettingBuffer + Index);
- Index++;
- lsb = *(pTuningSettingBuffer + Index);
- Index++;
- Temp16 = VL53L0X_MAKEUINT16(lsb, msb);
- PALDevDataSet(Dev, targetRefRate, Temp16);
- break;
- default: /* invalid parameter */
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- }
-
- } else if (NumberOfWrites <= 4) {
- Address = *(pTuningSettingBuffer + Index);
- Index++;
-
- for (i = 0; i < NumberOfWrites; i++) {
- localBuffer[i] = *(pTuningSettingBuffer +
- Index);
- Index++;
- }
-
- Status = VL53L0X_WriteMulti(Dev, Address, localBuffer,
- NumberOfWrites);
-
- } else {
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- }
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_get_total_xtalk_rate(VL53L0X_DEV Dev,
- VL53L0X_RangingMeasurementData_t *pRangingMeasurementData,
- FixPoint1616_t *ptotal_xtalk_rate_mcps)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- uint8_t xtalkCompEnable;
- FixPoint1616_t totalXtalkMegaCps;
- FixPoint1616_t xtalkPerSpadMegaCps;
-
- *ptotal_xtalk_rate_mcps = 0;
-
- Status = VL53L0X_GetXTalkCompensationEnable(Dev, &xtalkCompEnable);
- if (Status == VL53L0X_ERROR_NONE) {
-
- if (xtalkCompEnable) {
-
- VL53L0X_GETPARAMETERFIELD(
- Dev,
- XTalkCompensationRateMegaCps,
- xtalkPerSpadMegaCps);
-
- /* FixPoint1616 * FixPoint 8:8 = FixPoint0824 */
- totalXtalkMegaCps =
- pRangingMeasurementData->EffectiveSpadRtnCount *
- xtalkPerSpadMegaCps;
-
- /* FixPoint0824 >> 8 = FixPoint1616 */
- *ptotal_xtalk_rate_mcps =
- (totalXtalkMegaCps + 0x80) >> 8;
- }
- }
-
- return Status;
-}
-
-VL53L0X_Error VL53L0X_get_total_signal_rate(VL53L0X_DEV Dev,
- VL53L0X_RangingMeasurementData_t *pRangingMeasurementData,
- FixPoint1616_t *ptotal_signal_rate_mcps)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- FixPoint1616_t totalXtalkMegaCps;
-
- LOG_FUNCTION_START("");
-
- *ptotal_signal_rate_mcps =
- pRangingMeasurementData->SignalRateRtnMegaCps;
-
- Status = VL53L0X_get_total_xtalk_rate(
- Dev, pRangingMeasurementData, &totalXtalkMegaCps);
-
- if (Status == VL53L0X_ERROR_NONE)
- *ptotal_signal_rate_mcps += totalXtalkMegaCps;
-
- return Status;
-}
-
-VL53L0X_Error VL53L0X_calc_dmax(
- VL53L0X_DEV Dev,
- FixPoint1616_t totalSignalRate_mcps,
- FixPoint1616_t totalCorrSignalRate_mcps,
- FixPoint1616_t pwMult,
- uint32_t sigmaEstimateP1,
- FixPoint1616_t sigmaEstimateP2,
- uint32_t peakVcselDuration_us,
- uint32_t *pdmax_mm)
-{
- const uint32_t cSigmaLimit = 18;
- const FixPoint1616_t cSignalLimit = 0x4000; /* 0.25 */
- const FixPoint1616_t cSigmaEstRef = 0x00000042; /* 0.001 */
- const uint32_t cAmbEffWidthSigmaEst_ns = 6;
- const uint32_t cAmbEffWidthDMax_ns = 7;
- uint32_t dmaxCalRange_mm;
- FixPoint1616_t dmaxCalSignalRateRtn_mcps;
- FixPoint1616_t minSignalNeeded;
- FixPoint1616_t minSignalNeeded_p1;
- FixPoint1616_t minSignalNeeded_p2;
- FixPoint1616_t minSignalNeeded_p3;
- FixPoint1616_t minSignalNeeded_p4;
- FixPoint1616_t sigmaLimitTmp;
- FixPoint1616_t sigmaEstSqTmp;
- FixPoint1616_t signalLimitTmp;
- FixPoint1616_t SignalAt0mm;
- FixPoint1616_t dmaxDark;
- FixPoint1616_t dmaxAmbient;
- FixPoint1616_t dmaxDarkTmp;
- FixPoint1616_t sigmaEstP2Tmp;
- uint32_t signalRateTemp_mcps;
-
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- LOG_FUNCTION_START("");
-
- dmaxCalRange_mm =
- PALDevDataGet(Dev, DmaxCalRangeMilliMeter);
-
- dmaxCalSignalRateRtn_mcps =
- PALDevDataGet(Dev, DmaxCalSignalRateRtnMegaCps);
-
- /* uint32 * FixPoint1616 = FixPoint1616 */
- SignalAt0mm = dmaxCalRange_mm * dmaxCalSignalRateRtn_mcps;
-
- /* FixPoint1616 >> 8 = FixPoint2408 */
- SignalAt0mm = (SignalAt0mm + 0x80) >> 8;
- SignalAt0mm *= dmaxCalRange_mm;
-
- minSignalNeeded_p1 = 0;
- if (totalCorrSignalRate_mcps > 0) {
-
- /* Shift by 10 bits to increase resolution prior to the
- * division */
- signalRateTemp_mcps = totalSignalRate_mcps << 10;
-
- /* Add rounding value prior to division */
- minSignalNeeded_p1 = signalRateTemp_mcps +
- (totalCorrSignalRate_mcps/2);
-
- /* FixPoint0626/FixPoint1616 = FixPoint2210 */
- minSignalNeeded_p1 /= totalCorrSignalRate_mcps;
-
- /* Apply a factored version of the speed of light.
- Correction to be applied at the end */
- minSignalNeeded_p1 *= 3;
-
- /* FixPoint2210 * FixPoint2210 = FixPoint1220 */
- minSignalNeeded_p1 *= minSignalNeeded_p1;
-
- /* FixPoint1220 >> 16 = FixPoint2804 */
- minSignalNeeded_p1 = (minSignalNeeded_p1 + 0x8000) >> 16;
- }
-
- minSignalNeeded_p2 = pwMult * sigmaEstimateP1;
-
- /* FixPoint1616 >> 16 = uint32 */
- minSignalNeeded_p2 = (minSignalNeeded_p2 + 0x8000) >> 16;
-
- /* uint32 * uint32 = uint32 */
- minSignalNeeded_p2 *= minSignalNeeded_p2;
-
- /* Check sigmaEstimateP2
- * If this value is too high there is not enough signal rate
- * to calculate dmax value so set a suitable value to ensure
- * a very small dmax.
- */
- sigmaEstP2Tmp = (sigmaEstimateP2 + 0x8000) >> 16;
- sigmaEstP2Tmp = (sigmaEstP2Tmp + cAmbEffWidthSigmaEst_ns/2)/
- cAmbEffWidthSigmaEst_ns;
- sigmaEstP2Tmp *= cAmbEffWidthDMax_ns;
-
- if (sigmaEstP2Tmp > 0xffff) {
- minSignalNeeded_p3 = 0xfff00000;
- } else {
-
- /* DMAX uses a different ambient width from sigma, so apply
- * correction.
- * Perform division before multiplication to prevent overflow.
- */
- sigmaEstimateP2 = (sigmaEstimateP2 + cAmbEffWidthSigmaEst_ns/2)/
- cAmbEffWidthSigmaEst_ns;
- sigmaEstimateP2 *= cAmbEffWidthDMax_ns;
-
- /* FixPoint1616 >> 16 = uint32 */
- minSignalNeeded_p3 = (sigmaEstimateP2 + 0x8000) >> 16;
-
- minSignalNeeded_p3 *= minSignalNeeded_p3;
-
- }
-
- /* FixPoint1814 / uint32 = FixPoint1814 */
- sigmaLimitTmp = ((cSigmaLimit << 14) + 500) / 1000;
-
- /* FixPoint1814 * FixPoint1814 = FixPoint3628 := FixPoint0428 */
- sigmaLimitTmp *= sigmaLimitTmp;
-
- /* FixPoint1616 * FixPoint1616 = FixPoint3232 */
- sigmaEstSqTmp = cSigmaEstRef * cSigmaEstRef;
-
- /* FixPoint3232 >> 4 = FixPoint0428 */
- sigmaEstSqTmp = (sigmaEstSqTmp + 0x08) >> 4;
-
- /* FixPoint0428 - FixPoint0428 = FixPoint0428 */
- sigmaLimitTmp -= sigmaEstSqTmp;
-
- /* uint32_t * FixPoint0428 = FixPoint0428 */
- minSignalNeeded_p4 = 4 * 12 * sigmaLimitTmp;
-
- /* FixPoint0428 >> 14 = FixPoint1814 */
- minSignalNeeded_p4 = (minSignalNeeded_p4 + 0x2000) >> 14;
-
- /* uint32 + uint32 = uint32 */
- minSignalNeeded = (minSignalNeeded_p2 + minSignalNeeded_p3);
-
- /* uint32 / uint32 = uint32 */
- minSignalNeeded += (peakVcselDuration_us/2);
- minSignalNeeded /= peakVcselDuration_us;
-
- /* uint32 << 14 = FixPoint1814 */
- minSignalNeeded <<= 14;
-
- /* FixPoint1814 / FixPoint1814 = uint32 */
- minSignalNeeded += (minSignalNeeded_p4/2);
- minSignalNeeded /= minSignalNeeded_p4;
-
- /* FixPoint3200 * FixPoint2804 := FixPoint2804*/
- minSignalNeeded *= minSignalNeeded_p1;
-
- /* Apply correction by dividing by 1000000.
- * This assumes 10E16 on the numerator of the equation
- * and 10E-22 on the denominator.
- * We do this because 32bit fix point calculation can't
- * handle the larger and smaller elements of this equation,
- * i.e. speed of light and pulse widths.
- */
- minSignalNeeded = (minSignalNeeded + 500) / 1000;
- minSignalNeeded <<= 4;
-
- minSignalNeeded = (minSignalNeeded + 500) / 1000;
-
- /* FixPoint1616 >> 8 = FixPoint2408 */
- signalLimitTmp = (cSignalLimit + 0x80) >> 8;
-
- /* FixPoint2408/FixPoint2408 = uint32 */
- if (signalLimitTmp != 0)
- dmaxDarkTmp = (SignalAt0mm + (signalLimitTmp / 2))
- / signalLimitTmp;
- else
- dmaxDarkTmp = 0;
-
- dmaxDark = VL53L0X_isqrt(dmaxDarkTmp);
-
- /* FixPoint2408/FixPoint2408 = uint32 */
- if (minSignalNeeded != 0)
- dmaxAmbient = (SignalAt0mm + minSignalNeeded/2)
- / minSignalNeeded;
- else
- dmaxAmbient = 0;
-
- dmaxAmbient = VL53L0X_isqrt(dmaxAmbient);
-
- *pdmax_mm = dmaxDark;
- if (dmaxDark > dmaxAmbient)
- *pdmax_mm = dmaxAmbient;
-
- LOG_FUNCTION_END(Status);
-
- return Status;
-}
-
-
-VL53L0X_Error VL53L0X_calc_sigma_estimate(VL53L0X_DEV Dev,
- VL53L0X_RangingMeasurementData_t *pRangingMeasurementData,
- FixPoint1616_t *pSigmaEstimate,
- uint32_t *pDmax_mm)
-{
- /* Expressed in 100ths of a ns, i.e. centi-ns */
- const uint32_t cPulseEffectiveWidth_centi_ns = 800;
- /* Expressed in 100ths of a ns, i.e. centi-ns */
- const uint32_t cAmbientEffectiveWidth_centi_ns = 600;
- const FixPoint1616_t cSigmaEstRef = 0x00000042; /* 0.001 */
- const uint32_t cVcselPulseWidth_ps = 4700; /* pico secs */
- const FixPoint1616_t cSigmaEstMax = 0x028F87AE;
- const FixPoint1616_t cSigmaEstRtnMax = 0xF000;
- const FixPoint1616_t cAmbToSignalRatioMax = 0xF0000000/
- cAmbientEffectiveWidth_centi_ns;
- /* Time Of Flight per mm (6.6 pico secs) */
- const FixPoint1616_t cTOF_per_mm_ps = 0x0006999A;
- const uint32_t c16BitRoundingParam = 0x00008000;
- const FixPoint1616_t cMaxXTalk_kcps = 0x00320000;
- const uint32_t cPllPeriod_ps = 1655;
-
- uint32_t vcselTotalEventsRtn;
- uint32_t finalRangeTimeoutMicroSecs;
- uint32_t preRangeTimeoutMicroSecs;
- FixPoint1616_t sigmaEstimateP1;
- FixPoint1616_t sigmaEstimateP2;
- FixPoint1616_t sigmaEstimateP3;
- FixPoint1616_t deltaT_ps;
- FixPoint1616_t pwMult;
- FixPoint1616_t sigmaEstRtn;
- FixPoint1616_t sigmaEstimate;
- FixPoint1616_t xTalkCorrection;
- FixPoint1616_t ambientRate_kcps;
- FixPoint1616_t peakSignalRate_kcps;
- FixPoint1616_t xTalkCompRate_mcps;
- uint32_t xTalkCompRate_kcps;
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- FixPoint1616_t diff1_mcps;
- FixPoint1616_t diff2_mcps;
- FixPoint1616_t sqr1;
- FixPoint1616_t sqr2;
- FixPoint1616_t sqrSum;
- FixPoint1616_t sqrtResult_centi_ns;
- FixPoint1616_t sqrtResult;
- FixPoint1616_t totalSignalRate_mcps;
- FixPoint1616_t correctedSignalRate_mcps;
- uint32_t vcselWidth;
- uint32_t finalRangeMacroPCLKS;
- uint32_t preRangeMacroPCLKS;
- uint32_t peakVcselDuration_us;
- uint8_t finalRangeVcselPCLKS;
- uint8_t preRangeVcselPCLKS;
- /*! \addtogroup calc_sigma_estimate
- * @{
- *
- * Estimates the range sigma based on the
- *
- * - vcsel_rate_kcps
- * - ambient_rate_kcps
- * - signal_total_events
- * - xtalk_rate
- *
- * and the following parameters
- *
- * - SigmaEstRefArray
- * - SigmaEstEffPulseWidth
- * - SigmaEstEffAmbWidth
- */
-
- LOG_FUNCTION_START("");
-
- VL53L0X_GETPARAMETERFIELD(Dev, XTalkCompensationRateMegaCps,
- xTalkCompRate_mcps);
-
- /*
- * We work in kcps rather than mcps as this helps keep within the
- * confines of the 32 Fix1616 type.
- */
-
- ambientRate_kcps =
- (pRangingMeasurementData->AmbientRateRtnMegaCps * 1000) >> 16;
-
- correctedSignalRate_mcps =
- pRangingMeasurementData->SignalRateRtnMegaCps;
-
-
- Status = VL53L0X_get_total_signal_rate(
- Dev, pRangingMeasurementData, &totalSignalRate_mcps);
- Status = VL53L0X_get_total_xtalk_rate(
- Dev, pRangingMeasurementData, &xTalkCompRate_mcps);
-
-
- /* Signal rate measurement provided by device is the
- * peak signal rate, not average.
- */
- peakSignalRate_kcps = (totalSignalRate_mcps * 1000);
- peakSignalRate_kcps = (peakSignalRate_kcps + 0x8000) >> 16;
-
- xTalkCompRate_kcps = xTalkCompRate_mcps * 1000;
-
- if (xTalkCompRate_kcps > cMaxXTalk_kcps)
- xTalkCompRate_kcps = cMaxXTalk_kcps;
-
- if (Status == VL53L0X_ERROR_NONE) {
-
- /* Calculate final range macro periods */
- finalRangeTimeoutMicroSecs = VL53L0X_GETDEVICESPECIFICPARAMETER(
- Dev, FinalRangeTimeoutMicroSecs);
-
- finalRangeVcselPCLKS = VL53L0X_GETDEVICESPECIFICPARAMETER(
- Dev, FinalRangeVcselPulsePeriod);
-
- finalRangeMacroPCLKS = VL53L0X_calc_timeout_mclks(
- Dev, finalRangeTimeoutMicroSecs, finalRangeVcselPCLKS);
-
- /* Calculate pre-range macro periods */
- preRangeTimeoutMicroSecs = VL53L0X_GETDEVICESPECIFICPARAMETER(
- Dev, PreRangeTimeoutMicroSecs);
-
- preRangeVcselPCLKS = VL53L0X_GETDEVICESPECIFICPARAMETER(
- Dev, PreRangeVcselPulsePeriod);
-
- preRangeMacroPCLKS = VL53L0X_calc_timeout_mclks(
- Dev, preRangeTimeoutMicroSecs, preRangeVcselPCLKS);
-
- vcselWidth = 3;
- if (finalRangeVcselPCLKS == 8)
- vcselWidth = 2;
-
-
- peakVcselDuration_us = vcselWidth * 2048 *
- (preRangeMacroPCLKS + finalRangeMacroPCLKS);
- peakVcselDuration_us = (peakVcselDuration_us + 500)/1000;
- peakVcselDuration_us *= cPllPeriod_ps;
- peakVcselDuration_us = (peakVcselDuration_us + 500)/1000;
-
- /* Fix1616 >> 8 = Fix2408 */
- totalSignalRate_mcps = (totalSignalRate_mcps + 0x80) >> 8;
-
- /* Fix2408 * uint32 = Fix2408 */
- vcselTotalEventsRtn = totalSignalRate_mcps *
- peakVcselDuration_us;
-
- /* Fix2408 >> 8 = uint32 */
- vcselTotalEventsRtn = (vcselTotalEventsRtn + 0x80) >> 8;
-
- /* Fix2408 << 8 = Fix1616 = */
- totalSignalRate_mcps <<= 8;
- }
-
- if (Status != VL53L0X_ERROR_NONE) {
- LOG_FUNCTION_END(Status);
- return Status;
- }
-
- if (peakSignalRate_kcps == 0) {
- *pSigmaEstimate = cSigmaEstMax;
- PALDevDataSet(Dev, SigmaEstimate, cSigmaEstMax);
- *pDmax_mm = 0;
- } else {
- if (vcselTotalEventsRtn < 1)
- vcselTotalEventsRtn = 1;
-
- /*
- * Calculate individual components of the main equation -
- * replicating the equation implemented in the script
- * OpenAll_Ewok_ranging_data.jsl.
- *
- * sigmaEstimateP1 represents the effective pulse width, which
- * is a tuning parameter, rather than a real value.
- *
- * sigmaEstimateP2 represents the ambient/signal rate ratio
- * expressed as a multiple of the effective ambient width
- * (tuning parameter).
- *
- * sigmaEstimateP3 provides the signal event component, with the
- * knowledge that
- * - Noise of a square pulse is 1/sqrt(12) of the pulse
- * width.
- * - at 0Lux, sigma is proportional to
- * effectiveVcselPulseWidth/sqrt(12 * signalTotalEvents)
- *
- * deltaT_ps represents the time of flight in pico secs for the
- * current range measurement, using the "TOF per mm" constant
- * (in ps).
- */
-
- sigmaEstimateP1 = cPulseEffectiveWidth_centi_ns;
-
- /* ((FixPoint1616 << 16)* uint32)/uint32 = FixPoint1616 */
- sigmaEstimateP2 = (ambientRate_kcps << 16)/peakSignalRate_kcps;
- if (sigmaEstimateP2 > cAmbToSignalRatioMax) {
- /* Clip to prevent overflow. Will ensure safe
- * max result. */
- sigmaEstimateP2 = cAmbToSignalRatioMax;
- }
- sigmaEstimateP2 *= cAmbientEffectiveWidth_centi_ns;
-
- sigmaEstimateP3 = 2 * VL53L0X_isqrt(vcselTotalEventsRtn * 12);
-
- /* uint32 * FixPoint1616 = FixPoint1616 */
- deltaT_ps = pRangingMeasurementData->RangeMilliMeter *
- cTOF_per_mm_ps;
-
- /*
- * vcselRate - xtalkCompRate
- * (uint32 << 16) - FixPoint1616 = FixPoint1616.
- * Divide result by 1000 to convert to mcps.
- * 500 is added to ensure rounding when integer division
- * truncates.
- */
- diff1_mcps = (((peakSignalRate_kcps << 16) -
- xTalkCompRate_kcps) + 500)/1000;
-
- /* vcselRate + xtalkCompRate */
- diff2_mcps = (((peakSignalRate_kcps << 16) +
- xTalkCompRate_kcps) + 500)/1000;
-
- /* Shift by 8 bits to increase resolution prior to the
- * division */
- diff1_mcps <<= 8;
-
- /* FixPoint0824/FixPoint1616 = FixPoint2408 */
- xTalkCorrection = abs(diff1_mcps/diff2_mcps);
-
- /* FixPoint2408 << 8 = FixPoint1616 */
- xTalkCorrection <<= 8;
-
- /* FixPoint1616/uint32 = FixPoint1616 */
- pwMult = deltaT_ps/cVcselPulseWidth_ps; /* smaller than 1.0f */
-
- /*
- * FixPoint1616 * FixPoint1616 = FixPoint3232, however both
- * values are small enough such that32 bits will not be
- * exceeded.
- */
- pwMult *= ((1 << 16) - xTalkCorrection);
-
- /* (FixPoint3232 >> 16) = FixPoint1616 */
- pwMult = (pwMult + c16BitRoundingParam) >> 16;
-
- /* FixPoint1616 + FixPoint1616 = FixPoint1616 */
- pwMult += (1 << 16);
-
- /*
- * At this point the value will be 1.xx, therefore if we square
- * the value this will exceed 32 bits. To address this perform
- * a single shift to the right before the multiplication.
- */
- pwMult >>= 1;
- /* FixPoint1715 * FixPoint1715 = FixPoint3430 */
- pwMult = pwMult * pwMult;
-
- /* (FixPoint3430 >> 14) = Fix1616 */
- pwMult >>= 14;
-
- /* FixPoint1616 * uint32 = FixPoint1616 */
- sqr1 = pwMult * sigmaEstimateP1;
-
- /* (FixPoint1616 >> 16) = FixPoint3200 */
- sqr1 = (sqr1 + 0x8000) >> 16;
-
- /* FixPoint3200 * FixPoint3200 = FixPoint6400 */
- sqr1 *= sqr1;
-
- sqr2 = sigmaEstimateP2;
-
- /* (FixPoint1616 >> 16) = FixPoint3200 */
- sqr2 = (sqr2 + 0x8000) >> 16;
-
- /* FixPoint3200 * FixPoint3200 = FixPoint6400 */
- sqr2 *= sqr2;
-
- /* FixPoint64000 + FixPoint6400 = FixPoint6400 */
- sqrSum = sqr1 + sqr2;
-
- /* SQRT(FixPoin6400) = FixPoint3200 */
- sqrtResult_centi_ns = VL53L0X_isqrt(sqrSum);
-
- /* (FixPoint3200 << 16) = FixPoint1616 */
- sqrtResult_centi_ns <<= 16;
-
- /*
- * Note that the Speed Of Light is expressed in um per 1E-10
- * seconds (2997) Therefore to get mm/ns we have to divide by
- * 10000
- */
- sigmaEstRtn = (((sqrtResult_centi_ns+50)/100) /
- sigmaEstimateP3);
- sigmaEstRtn *= VL53L0X_SPEED_OF_LIGHT_IN_AIR;
-
- /* Add 5000 before dividing by 10000 to ensure rounding. */
- sigmaEstRtn += 5000;
- sigmaEstRtn /= 10000;
-
- if (sigmaEstRtn > cSigmaEstRtnMax) {
- /* Clip to prevent overflow. Will ensure safe
- * max result. */
- sigmaEstRtn = cSigmaEstRtnMax;
- }
-
- /* FixPoint1616 * FixPoint1616 = FixPoint3232 */
- sqr1 = sigmaEstRtn * sigmaEstRtn;
- /* FixPoint1616 * FixPoint1616 = FixPoint3232 */
- sqr2 = cSigmaEstRef * cSigmaEstRef;
-
- /* sqrt(FixPoint3232) = FixPoint1616 */
- sqrtResult = VL53L0X_isqrt((sqr1 + sqr2));
- /*
- * Note that the Shift by 4 bits increases resolution prior to
- * the sqrt, therefore the result must be shifted by 2 bits to
- * the right to revert back to the FixPoint1616 format.
- */
-
- sigmaEstimate = 1000 * sqrtResult;
-
- if ((peakSignalRate_kcps < 1) || (vcselTotalEventsRtn < 1) ||
- (sigmaEstimate > cSigmaEstMax)) {
- sigmaEstimate = cSigmaEstMax;
- }
-
- *pSigmaEstimate = (uint32_t)(sigmaEstimate);
- PALDevDataSet(Dev, SigmaEstimate, *pSigmaEstimate);
- Status = VL53L0X_calc_dmax(
- Dev,
- totalSignalRate_mcps,
- correctedSignalRate_mcps,
- pwMult,
- sigmaEstimateP1,
- sigmaEstimateP2,
- peakVcselDuration_us,
- pDmax_mm);
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_get_pal_range_status(VL53L0X_DEV Dev,
- uint8_t DeviceRangeStatus,
- FixPoint1616_t SignalRate,
- uint16_t EffectiveSpadRtnCount,
- VL53L0X_RangingMeasurementData_t *pRangingMeasurementData,
- uint8_t *pPalRangeStatus)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t NoneFlag;
- uint8_t SigmaLimitflag = 0;
- uint8_t SignalRefClipflag = 0;
- uint8_t RangeIgnoreThresholdflag = 0;
- uint8_t SigmaLimitCheckEnable = 0;
- uint8_t SignalRateFinalRangeLimitCheckEnable = 0;
- uint8_t SignalRefClipLimitCheckEnable = 0;
- uint8_t RangeIgnoreThresholdLimitCheckEnable = 0;
- FixPoint1616_t SigmaEstimate;
- FixPoint1616_t SigmaLimitValue;
- FixPoint1616_t SignalRefClipValue;
- FixPoint1616_t RangeIgnoreThresholdValue;
- FixPoint1616_t SignalRatePerSpad;
- uint8_t DeviceRangeStatusInternal = 0;
- uint16_t tmpWord = 0;
- uint8_t Temp8;
- uint32_t Dmax_mm = 0;
- FixPoint1616_t LastSignalRefMcps;
-
- LOG_FUNCTION_START("");
-
-
- /*
- * VL53L0X has a good ranging when the value of the
- * DeviceRangeStatus = 11. This function will replace the value 0 with
- * the value 11 in the DeviceRangeStatus.
- * In addition, the SigmaEstimator is not included in the VL53L0X
- * DeviceRangeStatus, this will be added in the PalRangeStatus.
- */
-
- DeviceRangeStatusInternal = ((DeviceRangeStatus & 0x78) >> 3);
-
- if (DeviceRangeStatusInternal == 0 ||
- DeviceRangeStatusInternal == 5 ||
- DeviceRangeStatusInternal == 7 ||
- DeviceRangeStatusInternal == 12 ||
- DeviceRangeStatusInternal == 13 ||
- DeviceRangeStatusInternal == 14 ||
- DeviceRangeStatusInternal == 15
- ) {
- NoneFlag = 1;
- } else {
- NoneFlag = 0;
- }
-
- /* LastSignalRefMcps */
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_WrByte(Dev, 0xFF, 0x01);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_RdWord(Dev,
- VL53L0X_REG_RESULT_PEAK_SIGNAL_RATE_REF,
- &tmpWord);
-
- LastSignalRefMcps = VL53L0X_FIXPOINT97TOFIXPOINT1616(tmpWord);
-
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_WrByte(Dev, 0xFF, 0x00);
-
- PALDevDataSet(Dev, LastSignalRefMcps, LastSignalRefMcps);
-
- /*
- * Check if Sigma limit is enabled, if yes then do comparison with limit
- * value and put the result back into pPalRangeStatus.
- */
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_GetLimitCheckEnable(Dev,
- VL53L0X_CHECKENABLE_SIGMA_FINAL_RANGE,
- &SigmaLimitCheckEnable);
-
- if ((SigmaLimitCheckEnable != 0) && (Status == VL53L0X_ERROR_NONE)) {
- /*
- * compute the Sigma and check with limit
- */
- Status = VL53L0X_calc_sigma_estimate(
- Dev,
- pRangingMeasurementData,
- &SigmaEstimate,
- &Dmax_mm);
- if (Status == VL53L0X_ERROR_NONE)
- pRangingMeasurementData->RangeDMaxMilliMeter = Dmax_mm;
-
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_GetLimitCheckValue(Dev,
- VL53L0X_CHECKENABLE_SIGMA_FINAL_RANGE,
- &SigmaLimitValue);
-
- if ((SigmaLimitValue > 0) &&
- (SigmaEstimate > SigmaLimitValue))
- /* Limit Fail */
- SigmaLimitflag = 1;
- }
- }
-
- /*
- * Check if Signal ref clip limit is enabled, if yes then do comparison
- * with limit value and put the result back into pPalRangeStatus.
- */
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_GetLimitCheckEnable(Dev,
- VL53L0X_CHECKENABLE_SIGNAL_REF_CLIP,
- &SignalRefClipLimitCheckEnable);
-
- if ((SignalRefClipLimitCheckEnable != 0) &&
- (Status == VL53L0X_ERROR_NONE)) {
-
- Status = VL53L0X_GetLimitCheckValue(Dev,
- VL53L0X_CHECKENABLE_SIGNAL_REF_CLIP,
- &SignalRefClipValue);
-
- if ((SignalRefClipValue > 0) &&
- (LastSignalRefMcps > SignalRefClipValue)) {
- /* Limit Fail */
- SignalRefClipflag = 1;
- }
- }
-
- /*
- * Check if Signal ref clip limit is enabled, if yes then do comparison
- * with limit value and put the result back into pPalRangeStatus.
- * EffectiveSpadRtnCount has a format 8.8
- * If (Return signal rate < (1.5 x Xtalk x number of Spads)) : FAIL
- */
- if (Status == VL53L0X_ERROR_NONE)
- Status = VL53L0X_GetLimitCheckEnable(Dev,
- VL53L0X_CHECKENABLE_RANGE_IGNORE_THRESHOLD,
- &RangeIgnoreThresholdLimitCheckEnable);
-
- if ((RangeIgnoreThresholdLimitCheckEnable != 0) &&
- (Status == VL53L0X_ERROR_NONE)) {
-
- /* Compute the signal rate per spad */
- if (EffectiveSpadRtnCount == 0) {
- SignalRatePerSpad = 0;
- } else {
- SignalRatePerSpad = (FixPoint1616_t)((256 * SignalRate)
- / EffectiveSpadRtnCount);
- }
-
- Status = VL53L0X_GetLimitCheckValue(Dev,
- VL53L0X_CHECKENABLE_RANGE_IGNORE_THRESHOLD,
- &RangeIgnoreThresholdValue);
-
- if ((RangeIgnoreThresholdValue > 0) &&
- (SignalRatePerSpad < RangeIgnoreThresholdValue)) {
- /* Limit Fail add 2^6 to range status */
- RangeIgnoreThresholdflag = 1;
- }
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- if (NoneFlag == 1) {
- *pPalRangeStatus = 255; /* NONE */
- } else if (DeviceRangeStatusInternal == 1 ||
- DeviceRangeStatusInternal == 2 ||
- DeviceRangeStatusInternal == 3) {
- *pPalRangeStatus = 5; /* HW fail */
- } else if (DeviceRangeStatusInternal == 6 ||
- DeviceRangeStatusInternal == 9) {
- *pPalRangeStatus = 4; /* Phase fail */
- } else if (DeviceRangeStatusInternal == 8 ||
- DeviceRangeStatusInternal == 10 ||
- SignalRefClipflag == 1) {
- *pPalRangeStatus = 3; /* Min range */
- } else if (DeviceRangeStatusInternal == 4 ||
- RangeIgnoreThresholdflag == 1) {
- *pPalRangeStatus = 2; /* Signal Fail */
- } else if (SigmaLimitflag == 1) {
- *pPalRangeStatus = 1; /* Sigma Fail */
- } else {
- *pPalRangeStatus = 0; /* Range Valid */
- }
- }
-
- /* DMAX only relevant during range error */
- if (*pPalRangeStatus == 0)
- pRangingMeasurementData->RangeDMaxMilliMeter = 0;
-
- /* fill the Limit Check Status */
-
- Status = VL53L0X_GetLimitCheckEnable(Dev,
- VL53L0X_CHECKENABLE_SIGNAL_RATE_FINAL_RANGE,
- &SignalRateFinalRangeLimitCheckEnable);
-
- if (Status == VL53L0X_ERROR_NONE) {
- if ((SigmaLimitCheckEnable == 0) || (SigmaLimitflag == 1))
- Temp8 = 1;
- else
- Temp8 = 0;
- VL53L0X_SETARRAYPARAMETERFIELD(Dev, LimitChecksStatus,
- VL53L0X_CHECKENABLE_SIGMA_FINAL_RANGE, Temp8);
-
- if ((DeviceRangeStatusInternal == 4) ||
- (SignalRateFinalRangeLimitCheckEnable == 0))
- Temp8 = 1;
- else
- Temp8 = 0;
- VL53L0X_SETARRAYPARAMETERFIELD(Dev, LimitChecksStatus,
- VL53L0X_CHECKENABLE_SIGNAL_RATE_FINAL_RANGE,
- Temp8);
-
- if ((SignalRefClipLimitCheckEnable == 0) ||
- (SignalRefClipflag == 1))
- Temp8 = 1;
- else
- Temp8 = 0;
-
- VL53L0X_SETARRAYPARAMETERFIELD(Dev, LimitChecksStatus,
- VL53L0X_CHECKENABLE_SIGNAL_REF_CLIP, Temp8);
-
- if ((RangeIgnoreThresholdLimitCheckEnable == 0) ||
- (RangeIgnoreThresholdflag == 1))
- Temp8 = 1;
- else
- Temp8 = 0;
-
- VL53L0X_SETARRAYPARAMETERFIELD(Dev, LimitChecksStatus,
- VL53L0X_CHECKENABLE_RANGE_IGNORE_THRESHOLD,
- Temp8);
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-
-}
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_core.h b/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_core.h
deleted file mode 100644
index b019419b3..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_core.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2019-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-#ifndef _VL53L0X_API_CORE_H_
-#define _VL53L0X_API_CORE_H_
-
-#include "vl53l0x_def.h"
-#include "vl53l0x_platform.h"
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-VL53L0X_Error VL53L0X_reverse_bytes(uint8_t *data, uint32_t size);
-
-VL53L0X_Error VL53L0X_measurement_poll_for_completion(VL53L0X_DEV Dev);
-
-uint8_t VL53L0X_encode_vcsel_period(uint8_t vcsel_period_pclks);
-
-uint8_t VL53L0X_decode_vcsel_period(uint8_t vcsel_period_reg);
-
-uint32_t VL53L0X_isqrt(uint32_t num);
-
-uint32_t VL53L0X_quadrature_sum(uint32_t a, uint32_t b);
-
-VL53L0X_Error VL53L0X_get_info_from_device(VL53L0X_DEV Dev, uint8_t option);
-
-VL53L0X_Error VL53L0X_set_vcsel_pulse_period(VL53L0X_DEV Dev,
- VL53L0X_VcselPeriod VcselPeriodType, uint8_t VCSELPulsePeriodPCLK);
-
-VL53L0X_Error VL53L0X_get_vcsel_pulse_period(VL53L0X_DEV Dev,
- VL53L0X_VcselPeriod VcselPeriodType, uint8_t *pVCSELPulsePeriodPCLK);
-
-uint32_t VL53L0X_decode_timeout(uint16_t encoded_timeout);
-
-VL53L0X_Error get_sequence_step_timeout(VL53L0X_DEV Dev,
- VL53L0X_SequenceStepId SequenceStepId,
- uint32_t *pTimeOutMicroSecs);
-
-VL53L0X_Error set_sequence_step_timeout(VL53L0X_DEV Dev,
- VL53L0X_SequenceStepId SequenceStepId,
- uint32_t TimeOutMicroSecs);
-
-VL53L0X_Error VL53L0X_set_measurement_timing_budget_micro_seconds(VL53L0X_DEV Dev,
- uint32_t MeasurementTimingBudgetMicroSeconds);
-
-VL53L0X_Error VL53L0X_get_measurement_timing_budget_micro_seconds(VL53L0X_DEV Dev,
- uint32_t *pMeasurementTimingBudgetMicroSeconds);
-
-VL53L0X_Error VL53L0X_load_tuning_settings(VL53L0X_DEV Dev,
- uint8_t *pTuningSettingBuffer);
-
-VL53L0X_Error VL53L0X_calc_sigma_estimate(VL53L0X_DEV Dev,
- VL53L0X_RangingMeasurementData_t *pRangingMeasurementData,
- FixPoint1616_t *pSigmaEstimate, uint32_t *pDmax_mm);
-
-VL53L0X_Error VL53L0X_get_total_xtalk_rate(VL53L0X_DEV Dev,
- VL53L0X_RangingMeasurementData_t *pRangingMeasurementData,
- FixPoint1616_t *ptotal_xtalk_rate_mcps);
-
-VL53L0X_Error VL53L0X_get_total_signal_rate(VL53L0X_DEV Dev,
- VL53L0X_RangingMeasurementData_t *pRangingMeasurementData,
- FixPoint1616_t *ptotal_signal_rate_mcps);
-
-VL53L0X_Error VL53L0X_get_pal_range_status(VL53L0X_DEV Dev,
- uint8_t DeviceRangeStatus,
- FixPoint1616_t SignalRate,
- uint16_t EffectiveSpadRtnCount,
- VL53L0X_RangingMeasurementData_t *pRangingMeasurementData,
- uint8_t *pPalRangeStatus);
-
-VL53L0X_Error VL53L0X_device_read_strobe(VL53L0X_DEV Dev);
-
-VL53L0X_Error VL53L0X_calc_dmax(
- VL53L0X_DEV Dev,
- FixPoint1616_t totalSignalRate_mcps,
- FixPoint1616_t totalCorrSignalRate_mcps,
- FixPoint1616_t pwMult,
- uint32_t sigmaEstimateP1,
- FixPoint1616_t sigmaEstimateP2,
- uint32_t peakVcselDuration_us,
- uint32_t *pdmax_mm);
-
-uint32_t VL53L0X_calc_timeout_mclks(VL53L0X_DEV Dev,
- uint32_t timeout_period_us, uint8_t vcsel_period_pclks);
-
-uint16_t VL53L0X_encode_timeout(uint32_t timeout_macro_clks);
-
-uint32_t VL53L0X_calc_macro_period_ps(VL53L0X_DEV Dev, uint8_t vcsel_period_pclks);
-
-uint32_t VL53L0X_calc_timeout_us(VL53L0X_DEV Dev,
- uint16_t timeout_period_mclks,
- uint8_t vcsel_period_pclks);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _VL53L0X_API_CORE_H_ */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_ranging.c b/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_ranging.c
deleted file mode 100644
index 27ff440ce..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_ranging.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2019-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-#include "vl53l0x_api.h"
-#include "vl53l0x_api_core.h"
-
-
-#ifndef __KERNEL__
-#include <stdlib.h>
-#endif
-#define LOG_FUNCTION_START(fmt, ...) \
- _LOG_FUNCTION_START(TRACE_MODULE_API, fmt, ##__VA_ARGS__)
-#define LOG_FUNCTION_END(status, ...) \
- _LOG_FUNCTION_END(TRACE_MODULE_API, status, ##__VA_ARGS__)
-#define LOG_FUNCTION_END_FMT(status, fmt, ...) \
- _LOG_FUNCTION_END_FMT(TRACE_MODULE_API, status, fmt, ##__VA_ARGS__)
-
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_ranging.h b/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_ranging.h
deleted file mode 100644
index a1f0f6657..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_ranging.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2019-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-#ifndef _VL53L0X_API_RANGING_H_
-#define _VL53L0X_API_RANGING_H_
-
-#include "vl53l0x_def.h"
-#include "vl53l0x_platform.h"
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _VL53L0X_API_RANGING_H_ */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_strings.c b/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_strings.c
deleted file mode 100644
index 8b1e814f6..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_strings.c
+++ /dev/null
@@ -1,448 +0,0 @@
-/**
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2019-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-#include "vl53l0x_api.h"
-#include "vl53l0x_api_core.h"
-#include "vl53l0x_api_strings.h"
-
-#ifndef __KERNEL__
-#include <stdlib.h>
-#endif
-
-#define LOG_FUNCTION_START(fmt, ...) \
- _LOG_FUNCTION_START(TRACE_MODULE_API, fmt, ##__VA_ARGS__)
-#define LOG_FUNCTION_END(status, ...) \
- _LOG_FUNCTION_END(TRACE_MODULE_API, status, ##__VA_ARGS__)
-#define LOG_FUNCTION_END_FMT(status, fmt, ...) \
- _LOG_FUNCTION_END_FMT(TRACE_MODULE_API, status, fmt, ##__VA_ARGS__)
-
-
-VL53L0X_Error VL53L0X_check_part_used(VL53L0X_DEV Dev,
- uint8_t *Revision,
- VL53L0X_DeviceInfo_t *pVL53L0X_DeviceInfo)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t ModuleIdInt;
- char *ProductId_tmp;
-
- LOG_FUNCTION_START("");
-
- Status = VL53L0X_get_info_from_device(Dev, 2);
-
- if (Status == VL53L0X_ERROR_NONE) {
- ModuleIdInt = VL53L0X_GETDEVICESPECIFICPARAMETER(Dev, ModuleId);
-
- if (ModuleIdInt == 0) {
- *Revision = 0;
- VL53L0X_COPYSTRING(pVL53L0X_DeviceInfo->ProductId, "");
- } else {
- *Revision = VL53L0X_GETDEVICESPECIFICPARAMETER(Dev, Revision);
- ProductId_tmp = VL53L0X_GETDEVICESPECIFICPARAMETER(Dev,
- ProductId);
- VL53L0X_COPYSTRING(pVL53L0X_DeviceInfo->ProductId, ProductId_tmp);
- }
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-
-VL53L0X_Error VL53L0X_get_device_info(VL53L0X_DEV Dev,
- VL53L0X_DeviceInfo_t *pVL53L0X_DeviceInfo)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t revision_id;
- uint8_t Revision;
-
- Status = VL53L0X_check_part_used(Dev, &Revision, pVL53L0X_DeviceInfo);
-
- if (Status == VL53L0X_ERROR_NONE) {
- if (Revision == 0) {
- VL53L0X_COPYSTRING(pVL53L0X_DeviceInfo->Name,
- VL53L0X_STRING_DEVICE_INFO_NAME_TS0);
- } else if ((Revision <= 34) && (Revision != 32)) {
- VL53L0X_COPYSTRING(pVL53L0X_DeviceInfo->Name,
- VL53L0X_STRING_DEVICE_INFO_NAME_TS1);
- } else if (Revision < 39) {
- VL53L0X_COPYSTRING(pVL53L0X_DeviceInfo->Name,
- VL53L0X_STRING_DEVICE_INFO_NAME_TS2);
- } else {
- VL53L0X_COPYSTRING(pVL53L0X_DeviceInfo->Name,
- VL53L0X_STRING_DEVICE_INFO_NAME_ES1);
- }
-
- VL53L0X_COPYSTRING(pVL53L0X_DeviceInfo->Type,
- VL53L0X_STRING_DEVICE_INFO_TYPE);
-
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_RdByte(Dev, VL53L0X_REG_IDENTIFICATION_MODEL_ID,
- &pVL53L0X_DeviceInfo->ProductType);
- }
-
- if (Status == VL53L0X_ERROR_NONE) {
- Status = VL53L0X_RdByte(Dev,
- VL53L0X_REG_IDENTIFICATION_REVISION_ID,
- &revision_id);
- pVL53L0X_DeviceInfo->ProductRevisionMajor = 1;
- pVL53L0X_DeviceInfo->ProductRevisionMinor =
- (revision_id & 0xF0) >> 4;
- }
-
- return Status;
-}
-
-
-VL53L0X_Error VL53L0X_get_device_error_string(VL53L0X_DeviceError ErrorCode,
- char *pDeviceErrorString)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- LOG_FUNCTION_START("");
-
- switch (ErrorCode) {
- case VL53L0X_DEVICEERROR_NONE:
- VL53L0X_COPYSTRING(pDeviceErrorString,
- VL53L0X_STRING_DEVICEERROR_NONE);
- break;
- case VL53L0X_DEVICEERROR_VCSELCONTINUITYTESTFAILURE:
- VL53L0X_COPYSTRING(pDeviceErrorString,
- VL53L0X_STRING_DEVICEERROR_VCSELCONTINUITYTESTFAILURE);
- break;
- case VL53L0X_DEVICEERROR_VCSELWATCHDOGTESTFAILURE:
- VL53L0X_COPYSTRING(pDeviceErrorString,
- VL53L0X_STRING_DEVICEERROR_VCSELWATCHDOGTESTFAILURE);
- break;
- case VL53L0X_DEVICEERROR_NOVHVVALUEFOUND:
- VL53L0X_COPYSTRING(pDeviceErrorString,
- VL53L0X_STRING_DEVICEERROR_NOVHVVALUEFOUND);
- break;
- case VL53L0X_DEVICEERROR_MSRCNOTARGET:
- VL53L0X_COPYSTRING(pDeviceErrorString,
- VL53L0X_STRING_DEVICEERROR_MSRCNOTARGET);
- break;
- case VL53L0X_DEVICEERROR_SNRCHECK:
- VL53L0X_COPYSTRING(pDeviceErrorString,
- VL53L0X_STRING_DEVICEERROR_SNRCHECK);
- break;
- case VL53L0X_DEVICEERROR_RANGEPHASECHECK:
- VL53L0X_COPYSTRING(pDeviceErrorString,
- VL53L0X_STRING_DEVICEERROR_RANGEPHASECHECK);
- break;
- case VL53L0X_DEVICEERROR_SIGMATHRESHOLDCHECK:
- VL53L0X_COPYSTRING(pDeviceErrorString,
- VL53L0X_STRING_DEVICEERROR_SIGMATHRESHOLDCHECK);
- break;
- case VL53L0X_DEVICEERROR_TCC:
- VL53L0X_COPYSTRING(pDeviceErrorString,
- VL53L0X_STRING_DEVICEERROR_TCC);
- break;
- case VL53L0X_DEVICEERROR_PHASECONSISTENCY:
- VL53L0X_COPYSTRING(pDeviceErrorString,
- VL53L0X_STRING_DEVICEERROR_PHASECONSISTENCY);
- break;
- case VL53L0X_DEVICEERROR_MINCLIP:
- VL53L0X_COPYSTRING(pDeviceErrorString,
- VL53L0X_STRING_DEVICEERROR_MINCLIP);
- break;
- case VL53L0X_DEVICEERROR_RANGECOMPLETE:
- VL53L0X_COPYSTRING(pDeviceErrorString,
- VL53L0X_STRING_DEVICEERROR_RANGECOMPLETE);
- break;
- case VL53L0X_DEVICEERROR_ALGOUNDERFLOW:
- VL53L0X_COPYSTRING(pDeviceErrorString,
- VL53L0X_STRING_DEVICEERROR_ALGOUNDERFLOW);
- break;
- case VL53L0X_DEVICEERROR_ALGOOVERFLOW:
- VL53L0X_COPYSTRING(pDeviceErrorString,
- VL53L0X_STRING_DEVICEERROR_ALGOOVERFLOW);
- break;
- case VL53L0X_DEVICEERROR_RANGEIGNORETHRESHOLD:
- VL53L0X_COPYSTRING(pDeviceErrorString,
- VL53L0X_STRING_DEVICEERROR_RANGEIGNORETHRESHOLD);
- break;
-
- default:
- VL53L0X_COPYSTRING(pDeviceErrorString,
- VL53L0X_STRING_UNKNOW_ERROR_CODE);
-
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_get_range_status_string(uint8_t RangeStatus,
- char *pRangeStatusString)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- LOG_FUNCTION_START("");
-
- switch (RangeStatus) {
- case 0:
- VL53L0X_COPYSTRING(pRangeStatusString,
- VL53L0X_STRING_RANGESTATUS_RANGEVALID);
- break;
- case 1:
- VL53L0X_COPYSTRING(pRangeStatusString,
- VL53L0X_STRING_RANGESTATUS_SIGMA);
- break;
- case 2:
- VL53L0X_COPYSTRING(pRangeStatusString,
- VL53L0X_STRING_RANGESTATUS_SIGNAL);
- break;
- case 3:
- VL53L0X_COPYSTRING(pRangeStatusString,
- VL53L0X_STRING_RANGESTATUS_MINRANGE);
- break;
- case 4:
- VL53L0X_COPYSTRING(pRangeStatusString,
- VL53L0X_STRING_RANGESTATUS_PHASE);
- break;
- case 5:
- VL53L0X_COPYSTRING(pRangeStatusString,
- VL53L0X_STRING_RANGESTATUS_HW);
- break;
-
- default: /**/
- VL53L0X_COPYSTRING(pRangeStatusString,
- VL53L0X_STRING_RANGESTATUS_NONE);
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_get_pal_error_string(VL53L0X_Error PalErrorCode,
- char *pPalErrorString)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- LOG_FUNCTION_START("");
-
- switch (PalErrorCode) {
- case VL53L0X_ERROR_NONE:
- VL53L0X_COPYSTRING(pPalErrorString,
- VL53L0X_STRING_ERROR_NONE);
- break;
- case VL53L0X_ERROR_CALIBRATION_WARNING:
- VL53L0X_COPYSTRING(pPalErrorString,
- VL53L0X_STRING_ERROR_CALIBRATION_WARNING);
- break;
- case VL53L0X_ERROR_MIN_CLIPPED:
- VL53L0X_COPYSTRING(pPalErrorString,
- VL53L0X_STRING_ERROR_MIN_CLIPPED);
- break;
- case VL53L0X_ERROR_UNDEFINED:
- VL53L0X_COPYSTRING(pPalErrorString,
- VL53L0X_STRING_ERROR_UNDEFINED);
- break;
- case VL53L0X_ERROR_INVALID_PARAMS:
- VL53L0X_COPYSTRING(pPalErrorString,
- VL53L0X_STRING_ERROR_INVALID_PARAMS);
- break;
- case VL53L0X_ERROR_NOT_SUPPORTED:
- VL53L0X_COPYSTRING(pPalErrorString,
- VL53L0X_STRING_ERROR_NOT_SUPPORTED);
- break;
- case VL53L0X_ERROR_INTERRUPT_NOT_CLEARED:
- VL53L0X_COPYSTRING(pPalErrorString,
- VL53L0X_STRING_ERROR_INTERRUPT_NOT_CLEARED);
- break;
- case VL53L0X_ERROR_RANGE_ERROR:
- VL53L0X_COPYSTRING(pPalErrorString,
- VL53L0X_STRING_ERROR_RANGE_ERROR);
- break;
- case VL53L0X_ERROR_TIME_OUT:
- VL53L0X_COPYSTRING(pPalErrorString,
- VL53L0X_STRING_ERROR_TIME_OUT);
- break;
- case VL53L0X_ERROR_MODE_NOT_SUPPORTED:
- VL53L0X_COPYSTRING(pPalErrorString,
- VL53L0X_STRING_ERROR_MODE_NOT_SUPPORTED);
- break;
- case VL53L0X_ERROR_BUFFER_TOO_SMALL:
- VL53L0X_COPYSTRING(pPalErrorString,
- VL53L0X_STRING_ERROR_BUFFER_TOO_SMALL);
- break;
- case VL53L0X_ERROR_GPIO_NOT_EXISTING:
- VL53L0X_COPYSTRING(pPalErrorString,
- VL53L0X_STRING_ERROR_GPIO_NOT_EXISTING);
- break;
- case VL53L0X_ERROR_GPIO_FUNCTIONALITY_NOT_SUPPORTED:
- VL53L0X_COPYSTRING(pPalErrorString,
- VL53L0X_STRING_ERROR_GPIO_FUNCTIONALITY_NOT_SUPPORTED);
- break;
- case VL53L0X_ERROR_CONTROL_INTERFACE:
- VL53L0X_COPYSTRING(pPalErrorString,
- VL53L0X_STRING_ERROR_CONTROL_INTERFACE);
- break;
- case VL53L0X_ERROR_INVALID_COMMAND:
- VL53L0X_COPYSTRING(pPalErrorString,
- VL53L0X_STRING_ERROR_INVALID_COMMAND);
- break;
- case VL53L0X_ERROR_DIVISION_BY_ZERO:
- VL53L0X_COPYSTRING(pPalErrorString,
- VL53L0X_STRING_ERROR_DIVISION_BY_ZERO);
- break;
- case VL53L0X_ERROR_REF_SPAD_INIT:
- VL53L0X_COPYSTRING(pPalErrorString,
- VL53L0X_STRING_ERROR_REF_SPAD_INIT);
- break;
- case VL53L0X_ERROR_NOT_IMPLEMENTED:
- VL53L0X_COPYSTRING(pPalErrorString,
- VL53L0X_STRING_ERROR_NOT_IMPLEMENTED);
- break;
-
- default:
- VL53L0X_COPYSTRING(pPalErrorString,
- VL53L0X_STRING_UNKNOW_ERROR_CODE);
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_get_pal_state_string(VL53L0X_State PalStateCode,
- char *pPalStateString)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- LOG_FUNCTION_START("");
-
- switch (PalStateCode) {
- case VL53L0X_STATE_POWERDOWN:
- VL53L0X_COPYSTRING(pPalStateString,
- VL53L0X_STRING_STATE_POWERDOWN);
- break;
- case VL53L0X_STATE_WAIT_STATICINIT:
- VL53L0X_COPYSTRING(pPalStateString,
- VL53L0X_STRING_STATE_WAIT_STATICINIT);
- break;
- case VL53L0X_STATE_STANDBY:
- VL53L0X_COPYSTRING(pPalStateString,
- VL53L0X_STRING_STATE_STANDBY);
- break;
- case VL53L0X_STATE_IDLE:
- VL53L0X_COPYSTRING(pPalStateString,
- VL53L0X_STRING_STATE_IDLE);
- break;
- case VL53L0X_STATE_RUNNING:
- VL53L0X_COPYSTRING(pPalStateString,
- VL53L0X_STRING_STATE_RUNNING);
- break;
- case VL53L0X_STATE_UNKNOWN:
- VL53L0X_COPYSTRING(pPalStateString,
- VL53L0X_STRING_STATE_UNKNOWN);
- break;
- case VL53L0X_STATE_ERROR:
- VL53L0X_COPYSTRING(pPalStateString,
- VL53L0X_STRING_STATE_ERROR);
- break;
-
- default:
- VL53L0X_COPYSTRING(pPalStateString,
- VL53L0X_STRING_STATE_UNKNOWN);
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
-
-VL53L0X_Error VL53L0X_get_sequence_steps_info(
- VL53L0X_SequenceStepId SequenceStepId,
- char *pSequenceStepsString)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- LOG_FUNCTION_START("");
-
- switch (SequenceStepId) {
- case VL53L0X_SEQUENCESTEP_TCC:
- VL53L0X_COPYSTRING(pSequenceStepsString,
- VL53L0X_STRING_SEQUENCESTEP_TCC);
- break;
- case VL53L0X_SEQUENCESTEP_DSS:
- VL53L0X_COPYSTRING(pSequenceStepsString,
- VL53L0X_STRING_SEQUENCESTEP_DSS);
- break;
- case VL53L0X_SEQUENCESTEP_MSRC:
- VL53L0X_COPYSTRING(pSequenceStepsString,
- VL53L0X_STRING_SEQUENCESTEP_MSRC);
- break;
- case VL53L0X_SEQUENCESTEP_PRE_RANGE:
- VL53L0X_COPYSTRING(pSequenceStepsString,
- VL53L0X_STRING_SEQUENCESTEP_PRE_RANGE);
- break;
- case VL53L0X_SEQUENCESTEP_FINAL_RANGE:
- VL53L0X_COPYSTRING(pSequenceStepsString,
- VL53L0X_STRING_SEQUENCESTEP_FINAL_RANGE);
- break;
-
- default:
- Status = VL53L0X_ERROR_INVALID_PARAMS;
- }
-
- LOG_FUNCTION_END(Status);
-
- return Status;
-}
-
-
-VL53L0X_Error VL53L0X_get_limit_check_info(VL53L0X_DEV Dev, uint16_t LimitCheckId,
- char *pLimitCheckString)
-{
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- LOG_FUNCTION_START("");
-
- switch (LimitCheckId) {
- case VL53L0X_CHECKENABLE_SIGMA_FINAL_RANGE:
- VL53L0X_COPYSTRING(pLimitCheckString,
- VL53L0X_STRING_CHECKENABLE_SIGMA_FINAL_RANGE);
- break;
- case VL53L0X_CHECKENABLE_SIGNAL_RATE_FINAL_RANGE:
- VL53L0X_COPYSTRING(pLimitCheckString,
- VL53L0X_STRING_CHECKENABLE_SIGNAL_RATE_FINAL_RANGE);
- break;
- case VL53L0X_CHECKENABLE_SIGNAL_REF_CLIP:
- VL53L0X_COPYSTRING(pLimitCheckString,
- VL53L0X_STRING_CHECKENABLE_SIGNAL_REF_CLIP);
- break;
- case VL53L0X_CHECKENABLE_RANGE_IGNORE_THRESHOLD:
- VL53L0X_COPYSTRING(pLimitCheckString,
- VL53L0X_STRING_CHECKENABLE_RANGE_IGNORE_THRESHOLD);
- break;
-
- case VL53L0X_CHECKENABLE_SIGNAL_RATE_MSRC:
- VL53L0X_COPYSTRING(pLimitCheckString,
- VL53L0X_STRING_CHECKENABLE_SIGNAL_RATE_MSRC);
- break;
-
- case VL53L0X_CHECKENABLE_SIGNAL_RATE_PRE_RANGE:
- VL53L0X_COPYSTRING(pLimitCheckString,
- VL53L0X_STRING_CHECKENABLE_SIGNAL_RATE_PRE_RANGE);
- break;
-
- default:
- VL53L0X_COPYSTRING(pLimitCheckString,
- VL53L0X_STRING_UNKNOW_ERROR_CODE);
-
- }
-
- LOG_FUNCTION_END(Status);
- return Status;
-}
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_strings.h b/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_strings.h
deleted file mode 100644
index dff4c45a2..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_api_strings.h
+++ /dev/null
@@ -1,266 +0,0 @@
-/**
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2019-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-#ifndef VL53L0X_API_STRINGS_H_
-#define VL53L0X_API_STRINGS_H_
-
-#include "vl53l0x_def.h"
-#include "vl53l0x_platform.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-VL53L0X_Error VL53L0X_get_device_info(VL53L0X_DEV Dev,
- VL53L0X_DeviceInfo_t *pVL53L0X_DeviceInfo);
-
-VL53L0X_Error VL53L0X_get_device_error_string(VL53L0X_DeviceError ErrorCode,
- char *pDeviceErrorString);
-
-VL53L0X_Error VL53L0X_get_range_status_string(uint8_t RangeStatus,
- char *pRangeStatusString);
-
-VL53L0X_Error VL53L0X_get_pal_error_string(VL53L0X_Error PalErrorCode,
- char *pPalErrorString);
-
-VL53L0X_Error VL53L0X_get_pal_state_string(VL53L0X_State PalStateCode,
- char *pPalStateString);
-
-VL53L0X_Error VL53L0X_get_sequence_steps_info(
- VL53L0X_SequenceStepId SequenceStepId,
- char *pSequenceStepsString);
-
-VL53L0X_Error VL53L0X_get_limit_check_info(VL53L0X_DEV Dev, uint16_t LimitCheckId,
- char *pLimitCheckString);
-
-VL53L0X_Error VL53L0X_check_part_used(VL53L0X_DEV Dev,
- uint8_t *Revision,
- VL53L0X_DeviceInfo_t *pVL53L0X_DeviceInfo);
-
-#ifdef USE_EMPTY_STRING
- #define VL53L0X_STRING_DEVICE_INFO_NAME ""
- #define VL53L0X_STRING_DEVICE_INFO_NAME_TS0 ""
- #define VL53L0X_STRING_DEVICE_INFO_NAME_TS1 ""
- #define VL53L0X_STRING_DEVICE_INFO_NAME_TS2 ""
- #define VL53L0X_STRING_DEVICE_INFO_NAME_ES1 ""
- #define VL53L0X_STRING_DEVICE_INFO_TYPE ""
-
- /* PAL ERROR strings */
- #define VL53L0X_STRING_ERROR_NONE ""
- #define VL53L0X_STRING_ERROR_CALIBRATION_WARNING ""
- #define VL53L0X_STRING_ERROR_MIN_CLIPPED ""
- #define VL53L0X_STRING_ERROR_UNDEFINED ""
- #define VL53L0X_STRING_ERROR_INVALID_PARAMS ""
- #define VL53L0X_STRING_ERROR_NOT_SUPPORTED ""
- #define VL53L0X_STRING_ERROR_RANGE_ERROR ""
- #define VL53L0X_STRING_ERROR_TIME_OUT ""
- #define VL53L0X_STRING_ERROR_MODE_NOT_SUPPORTED ""
- #define VL53L0X_STRING_ERROR_BUFFER_TOO_SMALL ""
- #define VL53L0X_STRING_ERROR_GPIO_NOT_EXISTING ""
- #define VL53L0X_STRING_ERROR_GPIO_FUNCTIONALITY_NOT_SUPPORTED ""
- #define VL53L0X_STRING_ERROR_CONTROL_INTERFACE ""
- #define VL53L0X_STRING_ERROR_INVALID_COMMAND ""
- #define VL53L0X_STRING_ERROR_DIVISION_BY_ZERO ""
- #define VL53L0X_STRING_ERROR_REF_SPAD_INIT ""
- #define VL53L0X_STRING_ERROR_NOT_IMPLEMENTED ""
-
- #define VL53L0X_STRING_UNKNOW_ERROR_CODE ""
-
-
-
- /* Range Status */
- #define VL53L0X_STRING_RANGESTATUS_NONE ""
- #define VL53L0X_STRING_RANGESTATUS_RANGEVALID ""
- #define VL53L0X_STRING_RANGESTATUS_SIGMA ""
- #define VL53L0X_STRING_RANGESTATUS_SIGNAL ""
- #define VL53L0X_STRING_RANGESTATUS_MINRANGE ""
- #define VL53L0X_STRING_RANGESTATUS_PHASE ""
- #define VL53L0X_STRING_RANGESTATUS_HW ""
-
-
- /* Range Status */
- #define VL53L0X_STRING_STATE_POWERDOWN ""
- #define VL53L0X_STRING_STATE_WAIT_STATICINIT ""
- #define VL53L0X_STRING_STATE_STANDBY ""
- #define VL53L0X_STRING_STATE_IDLE ""
- #define VL53L0X_STRING_STATE_RUNNING ""
- #define VL53L0X_STRING_STATE_UNKNOWN ""
- #define VL53L0X_STRING_STATE_ERROR ""
-
-
- /* Device Specific */
- #define VL53L0X_STRING_DEVICEERROR_NONE ""
- #define VL53L0X_STRING_DEVICEERROR_VCSELCONTINUITYTESTFAILURE ""
- #define VL53L0X_STRING_DEVICEERROR_VCSELWATCHDOGTESTFAILURE ""
- #define VL53L0X_STRING_DEVICEERROR_NOVHVVALUEFOUND ""
- #define VL53L0X_STRING_DEVICEERROR_MSRCNOTARGET ""
- #define VL53L0X_STRING_DEVICEERROR_SNRCHECK ""
- #define VL53L0X_STRING_DEVICEERROR_RANGEPHASECHECK ""
- #define VL53L0X_STRING_DEVICEERROR_SIGMATHRESHOLDCHECK ""
- #define VL53L0X_STRING_DEVICEERROR_TCC ""
- #define VL53L0X_STRING_DEVICEERROR_PHASECONSISTENCY ""
- #define VL53L0X_STRING_DEVICEERROR_MINCLIP ""
- #define VL53L0X_STRING_DEVICEERROR_RANGECOMPLETE ""
- #define VL53L0X_STRING_DEVICEERROR_ALGOUNDERFLOW ""
- #define VL53L0X_STRING_DEVICEERROR_ALGOOVERFLOW ""
- #define VL53L0X_STRING_DEVICEERROR_RANGEIGNORETHRESHOLD ""
- #define VL53L0X_STRING_DEVICEERROR_UNKNOWN ""
-
- /* Check Enable */
- #define VL53L0X_STRING_CHECKENABLE_SIGMA_FINAL_RANGE ""
- #define VL53L0X_STRING_CHECKENABLE_SIGNAL_RATE_FINAL_RANGE ""
- #define VL53L0X_STRING_CHECKENABLE_SIGNAL_REF_CLIP ""
- #define VL53L0X_STRING_CHECKENABLE_RANGE_IGNORE_THRESHOLD ""
-
- /* Sequence Step */
- #define VL53L0X_STRING_SEQUENCESTEP_TCC ""
- #define VL53L0X_STRING_SEQUENCESTEP_DSS ""
- #define VL53L0X_STRING_SEQUENCESTEP_MSRC ""
- #define VL53L0X_STRING_SEQUENCESTEP_PRE_RANGE ""
- #define VL53L0X_STRING_SEQUENCESTEP_FINAL_RANGE ""
-#else
- #define VL53L0X_STRING_DEVICE_INFO_NAME "VL53L0X cut1.0"
- #define VL53L0X_STRING_DEVICE_INFO_NAME_TS0 "VL53L0X TS0"
- #define VL53L0X_STRING_DEVICE_INFO_NAME_TS1 "VL53L0X TS1"
- #define VL53L0X_STRING_DEVICE_INFO_NAME_TS2 "VL53L0X TS2"
- #define VL53L0X_STRING_DEVICE_INFO_NAME_ES1 "VL53L0X ES1 or later"
- #define VL53L0X_STRING_DEVICE_INFO_TYPE "VL53L0X"
-
- /* PAL ERROR strings */
- #define VL53L0X_STRING_ERROR_NONE \
- "No Error"
- #define VL53L0X_STRING_ERROR_CALIBRATION_WARNING \
- "Calibration Warning Error"
- #define VL53L0X_STRING_ERROR_MIN_CLIPPED \
- "Min clipped error"
- #define VL53L0X_STRING_ERROR_UNDEFINED \
- "Undefined error"
- #define VL53L0X_STRING_ERROR_INVALID_PARAMS \
- "Invalid parameters error"
- #define VL53L0X_STRING_ERROR_NOT_SUPPORTED \
- "Not supported error"
- #define VL53L0X_STRING_ERROR_RANGE_ERROR \
- "Range error"
- #define VL53L0X_STRING_ERROR_TIME_OUT \
- "Time out error"
- #define VL53L0X_STRING_ERROR_MODE_NOT_SUPPORTED \
- "Mode not supported error"
- #define VL53L0X_STRING_ERROR_BUFFER_TOO_SMALL \
- "Buffer too small"
- #define VL53L0X_STRING_ERROR_GPIO_NOT_EXISTING \
- "GPIO not existing"
- #define VL53L0X_STRING_ERROR_GPIO_FUNCTIONALITY_NOT_SUPPORTED \
- "GPIO funct not supported"
- #define VL53L0X_STRING_ERROR_INTERRUPT_NOT_CLEARED \
- "Interrupt not Cleared"
- #define VL53L0X_STRING_ERROR_CONTROL_INTERFACE \
- "Control Interface Error"
- #define VL53L0X_STRING_ERROR_INVALID_COMMAND \
- "Invalid Command Error"
- #define VL53L0X_STRING_ERROR_DIVISION_BY_ZERO \
- "Division by zero Error"
- #define VL53L0X_STRING_ERROR_REF_SPAD_INIT \
- "Reference Spad Init Error"
- #define VL53L0X_STRING_ERROR_NOT_IMPLEMENTED \
- "Not implemented error"
-
- #define VL53L0X_STRING_UNKNOW_ERROR_CODE \
- "Unknown Error Code"
-
-
-
- /* Range Status */
- #define VL53L0X_STRING_RANGESTATUS_NONE "No Update"
- #define VL53L0X_STRING_RANGESTATUS_RANGEVALID "Range Valid"
- #define VL53L0X_STRING_RANGESTATUS_SIGMA "Sigma Fail"
- #define VL53L0X_STRING_RANGESTATUS_SIGNAL "Signal Fail"
- #define VL53L0X_STRING_RANGESTATUS_MINRANGE "Min Range Fail"
- #define VL53L0X_STRING_RANGESTATUS_PHASE "Phase Fail"
- #define VL53L0X_STRING_RANGESTATUS_HW "Hardware Fail"
-
-
- /* Range Status */
- #define VL53L0X_STRING_STATE_POWERDOWN "POWERDOWN State"
- #define VL53L0X_STRING_STATE_WAIT_STATICINIT \
- "Wait for staticinit State"
- #define VL53L0X_STRING_STATE_STANDBY "STANDBY State"
- #define VL53L0X_STRING_STATE_IDLE "IDLE State"
- #define VL53L0X_STRING_STATE_RUNNING "RUNNING State"
- #define VL53L0X_STRING_STATE_UNKNOWN "UNKNOWN State"
- #define VL53L0X_STRING_STATE_ERROR "ERROR State"
-
-
- /* Device Specific */
- #define VL53L0X_STRING_DEVICEERROR_NONE "No Update"
- #define VL53L0X_STRING_DEVICEERROR_VCSELCONTINUITYTESTFAILURE \
- "VCSEL Continuity Test Failure"
- #define VL53L0X_STRING_DEVICEERROR_VCSELWATCHDOGTESTFAILURE \
- "VCSEL Watchdog Test Failure"
- #define VL53L0X_STRING_DEVICEERROR_NOVHVVALUEFOUND \
- "No VHV Value found"
- #define VL53L0X_STRING_DEVICEERROR_MSRCNOTARGET \
- "MSRC No Target Error"
- #define VL53L0X_STRING_DEVICEERROR_SNRCHECK \
- "SNR Check Exit"
- #define VL53L0X_STRING_DEVICEERROR_RANGEPHASECHECK \
- "Range Phase Check Error"
- #define VL53L0X_STRING_DEVICEERROR_SIGMATHRESHOLDCHECK \
- "Sigma Threshold Check Error"
- #define VL53L0X_STRING_DEVICEERROR_TCC \
- "TCC Error"
- #define VL53L0X_STRING_DEVICEERROR_PHASECONSISTENCY \
- "Phase Consistency Error"
- #define VL53L0X_STRING_DEVICEERROR_MINCLIP \
- "Min Clip Error"
- #define VL53L0X_STRING_DEVICEERROR_RANGECOMPLETE \
- "Range Complete"
- #define VL53L0X_STRING_DEVICEERROR_ALGOUNDERFLOW \
- "Range Algo Underflow Error"
- #define VL53L0X_STRING_DEVICEERROR_ALGOOVERFLOW \
- "Range Algo Overflow Error"
- #define VL53L0X_STRING_DEVICEERROR_RANGEIGNORETHRESHOLD \
- "Range Ignore Threshold Error"
- #define VL53L0X_STRING_DEVICEERROR_UNKNOWN \
- "Unknown error code"
-
- /* Check Enable */
- #define VL53L0X_STRING_CHECKENABLE_SIGMA_FINAL_RANGE \
- "SIGMA FINAL RANGE"
- #define VL53L0X_STRING_CHECKENABLE_SIGNAL_RATE_FINAL_RANGE \
- "SIGNAL RATE FINAL RANGE"
- #define VL53L0X_STRING_CHECKENABLE_SIGNAL_REF_CLIP \
- "SIGNAL REF CLIP"
- #define VL53L0X_STRING_CHECKENABLE_RANGE_IGNORE_THRESHOLD \
- "RANGE IGNORE THRESHOLD"
- #define VL53L0X_STRING_CHECKENABLE_SIGNAL_RATE_MSRC \
- "SIGNAL RATE MSRC"
- #define VL53L0X_STRING_CHECKENABLE_SIGNAL_RATE_PRE_RANGE \
- "SIGNAL RATE PRE RANGE"
-
- /* Sequence Step */
- #define VL53L0X_STRING_SEQUENCESTEP_TCC "TCC"
- #define VL53L0X_STRING_SEQUENCESTEP_DSS "DSS"
- #define VL53L0X_STRING_SEQUENCESTEP_MSRC "MSRC"
- #define VL53L0X_STRING_SEQUENCESTEP_PRE_RANGE "PRE RANGE"
- #define VL53L0X_STRING_SEQUENCESTEP_FINAL_RANGE "FINAL RANGE"
-#endif /* USE_EMPTY_STRING */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_def.h b/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_def.h
deleted file mode 100644
index 1c3121da6..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_def.h
+++ /dev/null
@@ -1,619 +0,0 @@
-/**
- ******************************************************************************
- * @file VL53L0X_def.h
- * @brief Type definitions for VL53L0X API
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2017(-2021) STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-#ifndef _VL53L0X_DEF_H_
-#define _VL53L0X_DEF_H_
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** @defgroup VL53L0X_globaldefine_group VL53L0X Defines
- * @brief VL53L0X Defines
- * @{
- */
-
-
-/** PAL SPECIFICATION major version */
-#define VL53L0X10_SPECIFICATION_VER_MAJOR 1
-/** PAL SPECIFICATION minor version */
-#define VL53L0X10_SPECIFICATION_VER_MINOR 2
-/** PAL SPECIFICATION sub version */
-#define VL53L0X10_SPECIFICATION_VER_SUB 7
-/** PAL SPECIFICATION sub version */
-#define VL53L0X10_SPECIFICATION_VER_REVISION 1440
-
-/** VL53L0X PAL IMPLEMENTATION major version */
-#define VL53L0X10_IMPLEMENTATION_VER_MAJOR 1
-/** VL53L0X PAL IMPLEMENTATION minor version */
-#define VL53L0X10_IMPLEMENTATION_VER_MINOR 0
-/** VL53L0X PAL IMPLEMENTATION sub version */
-#define VL53L0X10_IMPLEMENTATION_VER_SUB 9
-/** VL53L0X PAL IMPLEMENTATION sub version */
-#define VL53L0X10_IMPLEMENTATION_VER_REVISION 3673
-
-/** PAL SPECIFICATION major version */
-#define VL53L0X_SPECIFICATION_VER_MAJOR 1
-/** PAL SPECIFICATION minor version */
-#define VL53L0X_SPECIFICATION_VER_MINOR 2
-/** PAL SPECIFICATION sub version */
-#define VL53L0X_SPECIFICATION_VER_SUB 7
-/** PAL SPECIFICATION sub version */
-#define VL53L0X_SPECIFICATION_VER_REVISION 1440
-
-/** VL53L0X PAL IMPLEMENTATION major version */
-#define VL53L0X_IMPLEMENTATION_VER_MAJOR 1
-/** VL53L0X PAL IMPLEMENTATION minor version */
-#define VL53L0X_IMPLEMENTATION_VER_MINOR 0
-/** VL53L0X PAL IMPLEMENTATION sub version */
-#define VL53L0X_IMPLEMENTATION_VER_SUB 0
-/** VL53L0X PAL IMPLEMENTATION sub version */
-#define VL53L0X_IMPLEMENTATION_VER_REVISION 4570
-#define VL53L0X_DEFAULT_MAX_LOOP 200
-#define VL53L0X_MAX_STRING_LENGTH 32
-
-
-#include "vl53l0x_device.h"
-#include "vl53l0x_types.h"
-
-
-/****************************************
- * PRIVATE define do not edit
- ****************************************/
-
-/** @brief Defines the parameters of the Get Version Functions
- */
-typedef struct {
- uint32_t revision; /*!< revision number */
- uint8_t major; /*!< major number */
- uint8_t minor; /*!< minor number */
- uint8_t build; /*!< build number */
-} VL53L0X_Version_t;
-
-
-/** @brief Defines the parameters of the Get Device Info Functions
- */
-typedef struct {
- char Name[VL53L0X_MAX_STRING_LENGTH];
- /*!< Name of the Device e.g. Left_Distance */
- char Type[VL53L0X_MAX_STRING_LENGTH];
- /*!< Type of the Device e.g VL53L0X */
- char ProductId[VL53L0X_MAX_STRING_LENGTH];
- /*!< Product Identifier String */
- uint8_t ProductType;
- /*!< Product Type, VL53L0X = 1, VL53L1 = 2 */
- uint8_t ProductRevisionMajor;
- /*!< Product revision major */
- uint8_t ProductRevisionMinor;
- /*!< Product revision minor */
-} VL53L0X_DeviceInfo_t;
-
-
-/** @defgroup VL53L0X_define_Error_group Error and Warning code returned by API
- * The following DEFINE are used to identify the PAL ERROR
- * @{
- */
-
-typedef int8_t VL53L0X_Error;
-
-#define VL53L0X_ERROR_NONE ((VL53L0X_Error) 0)
-#define VL53L0X_ERROR_CALIBRATION_WARNING ((VL53L0X_Error) -1)
- /*!< Warning invalid calibration data may be in used
- \a VL53L0X_InitData()
- \a VL53L0X_GetOffsetCalibrationData
- \a VL53L0X_SetOffsetCalibrationData */
-#define VL53L0X_ERROR_MIN_CLIPPED ((VL53L0X_Error) -2)
- /*!< Warning parameter passed was clipped to min before to be applied */
-
-#define VL53L0X_ERROR_UNDEFINED ((VL53L0X_Error) -3)
- /*!< Unqualified error */
-#define VL53L0X_ERROR_INVALID_PARAMS ((VL53L0X_Error) -4)
- /*!< Parameter passed is invalid or out of range */
-#define VL53L0X_ERROR_NOT_SUPPORTED ((VL53L0X_Error) -5)
- /*!< Function is not supported in current mode or configuration */
-#define VL53L0X_ERROR_RANGE_ERROR ((VL53L0X_Error) -6)
- /*!< Device report a ranging error interrupt status */
-#define VL53L0X_ERROR_TIME_OUT ((VL53L0X_Error) -7)
- /*!< Aborted due to time out */
-#define VL53L0X_ERROR_MODE_NOT_SUPPORTED ((VL53L0X_Error) -8)
- /*!< Asked mode is not supported by the device */
-#define VL53L0X_ERROR_BUFFER_TOO_SMALL ((VL53L0X_Error) -9)
- /*!< ... */
-#define VL53L0X_ERROR_GPIO_NOT_EXISTING ((VL53L0X_Error) -10)
- /*!< User tried to setup a non-existing GPIO pin */
-#define VL53L0X_ERROR_GPIO_FUNCTIONALITY_NOT_SUPPORTED ((VL53L0X_Error) -11)
- /*!< unsupported GPIO functionality */
-#define VL53L0X_ERROR_INTERRUPT_NOT_CLEARED ((VL53L0X_Error) -12)
- /*!< Error during interrupt clear */
-#define VL53L0X_ERROR_CONTROL_INTERFACE ((VL53L0X_Error) -20)
- /*!< error reported from IO functions */
-#define VL53L0X_ERROR_INVALID_COMMAND ((VL53L0X_Error) -30)
- /*!< The command is not allowed in the current device state
- * (power down) */
-#define VL53L0X_ERROR_DIVISION_BY_ZERO ((VL53L0X_Error) -40)
- /*!< In the function a division by zero occurs */
-#define VL53L0X_ERROR_REF_SPAD_INIT ((VL53L0X_Error) -50)
- /*!< Error during reference SPAD initialization */
-#define VL53L0X_ERROR_NOT_IMPLEMENTED ((VL53L0X_Error) -99)
- /*!< Tells requested functionality has not been implemented yet or
- * not compatible with the device */
-/** @} VL53L0X_define_Error_group */
-
-
-/** @defgroup VL53L0X_define_DeviceModes_group Defines Device modes
- * Defines all possible modes for the device
- * @{
- */
-typedef uint8_t VL53L0X_DeviceModes;
-
-#define VL53L0X_DEVICEMODE_SINGLE_RANGING ((VL53L0X_DeviceModes) 0)
-#define VL53L0X_DEVICEMODE_CONTINUOUS_RANGING ((VL53L0X_DeviceModes) 1)
-#define VL53L0X_DEVICEMODE_SINGLE_HISTOGRAM ((VL53L0X_DeviceModes) 2)
-#define VL53L0X_DEVICEMODE_CONTINUOUS_TIMED_RANGING ((VL53L0X_DeviceModes) 3)
-#define VL53L0X_DEVICEMODE_SINGLE_ALS ((VL53L0X_DeviceModes) 10)
-#define VL53L0X_DEVICEMODE_GPIO_DRIVE ((VL53L0X_DeviceModes) 20)
-#define VL53L0X_DEVICEMODE_GPIO_OSC ((VL53L0X_DeviceModes) 21)
- /* ... Modes to be added depending on device */
-/** @} VL53L0X_define_DeviceModes_group */
-
-
-
-/** @defgroup VL53L0X_define_HistogramModes_group Defines Histogram modes
- * Defines all possible Histogram modes for the device
- * @{
- */
-typedef uint8_t VL53L0X_HistogramModes;
-
-#define VL53L0X_HISTOGRAMMODE_DISABLED ((VL53L0X_HistogramModes) 0)
- /*!< Histogram Disabled */
-#define VL53L0X_HISTOGRAMMODE_REFERENCE_ONLY ((VL53L0X_HistogramModes) 1)
- /*!< Histogram Reference array only */
-#define VL53L0X_HISTOGRAMMODE_RETURN_ONLY ((VL53L0X_HistogramModes) 2)
- /*!< Histogram Return array only */
-#define VL53L0X_HISTOGRAMMODE_BOTH ((VL53L0X_HistogramModes) 3)
- /*!< Histogram both Reference and Return Arrays */
- /* ... Modes to be added depending on device */
-/** @} VL53L0X_define_HistogramModes_group */
-
-
-/** @defgroup VL53L0X_define_PowerModes_group List of available Power Modes
- * List of available Power Modes
- * @{
- */
-
-typedef uint8_t VL53L0X_PowerModes;
-
-#define VL53L0X_POWERMODE_STANDBY_LEVEL1 ((VL53L0X_PowerModes) 0)
- /*!< Standby level 1 */
-#define VL53L0X_POWERMODE_STANDBY_LEVEL2 ((VL53L0X_PowerModes) 1)
- /*!< Standby level 2 */
-#define VL53L0X_POWERMODE_IDLE_LEVEL1 ((VL53L0X_PowerModes) 2)
- /*!< Idle level 1 */
-#define VL53L0X_POWERMODE_IDLE_LEVEL2 ((VL53L0X_PowerModes) 3)
- /*!< Idle level 2 */
-
-/** @} VL53L0X_define_PowerModes_group */
-
-
-/** @brief Defines all parameters for the device
- */
-typedef struct {
- VL53L0X_DeviceModes DeviceMode;
- /*!< Defines type of measurement to be done for the next measure */
- VL53L0X_HistogramModes HistogramMode;
- /*!< Defines type of histogram measurement to be done for the next
- * measure */
- uint32_t MeasurementTimingBudgetMicroSeconds;
- /*!< Defines the allowed total time for a single measurement */
- uint32_t InterMeasurementPeriodMilliSeconds;
- /*!< Defines time between two consecutive measurements (between two
- * measurement starts). If set to 0 means back-to-back mode */
- uint8_t XTalkCompensationEnable;
- /*!< Tells if Crosstalk compensation shall be enable or not */
- uint16_t XTalkCompensationRangeMilliMeter;
- /*!< CrossTalk compensation range in millimeter */
- FixPoint1616_t XTalkCompensationRateMegaCps;
- /*!< CrossTalk compensation rate in Mega counts per seconds.
- * Expressed in 16.16 fixed point format. */
- int32_t RangeOffsetMicroMeters;
- /*!< Range offset adjustment (mm). */
-
- uint8_t LimitChecksEnable[VL53L0X_CHECKENABLE_NUMBER_OF_CHECKS];
- /*!< This Array store all the Limit Check enable for this device. */
- uint8_t LimitChecksStatus[VL53L0X_CHECKENABLE_NUMBER_OF_CHECKS];
- /*!< This Array store all the Status of the check linked to last
- * measurement. */
- FixPoint1616_t LimitChecksValue[VL53L0X_CHECKENABLE_NUMBER_OF_CHECKS];
- /*!< This Array store all the Limit Check value for this device */
-
- uint8_t WrapAroundCheckEnable;
- /*!< Tells if Wrap Around Check shall be enable or not */
-} VL53L0X_DeviceParameters_t;
-
-
-/** @defgroup VL53L0X_define_State_group Defines the current status of the device
- * Defines the current status of the device
- * @{
- */
-
-typedef uint8_t VL53L0X_State;
-
-#define VL53L0X_STATE_POWERDOWN ((VL53L0X_State) 0)
- /*!< Device is in HW reset */
-#define VL53L0X_STATE_WAIT_STATICINIT ((VL53L0X_State) 1)
- /*!< Device is initialized and wait for static initialization */
-#define VL53L0X_STATE_STANDBY ((VL53L0X_State) 2)
- /*!< Device is in Low power Standby mode */
-#define VL53L0X_STATE_IDLE ((VL53L0X_State) 3)
- /*!< Device has been initialized and ready to do measurements */
-#define VL53L0X_STATE_RUNNING ((VL53L0X_State) 4)
- /*!< Device is performing measurement */
-#define VL53L0X_STATE_UNKNOWN ((VL53L0X_State) 98)
- /*!< Device is in unknown state and need to be rebooted */
-#define VL53L0X_STATE_ERROR ((VL53L0X_State) 99)
- /*!< Device is in error state and need to be rebooted */
-
-/** @} VL53L0X_define_State_group */
-
-
-/** @brief Structure containing the Dmax computation parameters and data
- */
-typedef struct {
- int32_t AmbTuningWindowFactor_K;
- /*!< internal algo tuning (*1000) */
- int32_t RetSignalAt0mm;
- /*!< intermediate dmax computation value caching */
-} VL53L0X_DMaxData_t;
-
-/**
- * @struct VL53L0X_RangeData_t
- * @brief Range measurement data.
- */
-typedef struct {
- uint32_t TimeStamp; /*!< 32-bit time stamp. */
- uint32_t MeasurementTimeUsec;
- /*!< Give the Measurement time needed by the device to do the
- * measurement.*/
-
-
- uint16_t RangeMilliMeter; /*!< range distance in millimeter. */
-
- uint16_t RangeDMaxMilliMeter;
- /*!< Tells what is the maximum detection distance of the device
- * in current setup and environment conditions (Filled when
- * applicable) */
-
- FixPoint1616_t SignalRateRtnMegaCps;
- /*!< Return signal rate (MCPS)\n these is a 16.16 fix point
- * value, which is effectively a measure of target
- * reflectance.*/
- FixPoint1616_t AmbientRateRtnMegaCps;
- /*!< Return ambient rate (MCPS)\n these is a 16.16 fix point
- * value, which is effectively a measure of the ambient
- * light.*/
-
- uint16_t EffectiveSpadRtnCount;
- /*!< Return the effective SPAD count for the return signal.
- * To obtain Real value it should be divided by 256 */
-
- uint8_t ZoneId;
- /*!< Denotes which zone and range scheduler stage the range
- * data relates to. */
- uint8_t RangeFractionalPart;
- /*!< Fractional part of range distance. Final value is a
- * FixPoint168 value. */
- uint8_t RangeStatus;
- /*!< Range Status for the current measurement. This is device
- * dependent. Value = 0 means value is valid.
- * See \ref RangeStatusPage */
-} VL53L0X_RangingMeasurementData_t;
-
-
-#define VL53L0X_HISTOGRAM_BUFFER_SIZE 24
-
-/**
- * @struct VL53L0X_HistogramData_t
- * @brief Histogram measurement data.
- */
-typedef struct {
- /* Histogram Measurement data */
- uint32_t HistogramData[VL53L0X_HISTOGRAM_BUFFER_SIZE];
- /*!< Histogram data */
- uint8_t HistogramType; /*!< Indicate the types of histogram data :
- Return only, Reference only, both Return and Reference */
- uint8_t FirstBin; /*!< First Bin value */
- uint8_t BufferSize; /*!< Buffer Size - Set by the user.*/
- uint8_t NumberOfBins;
- /*!< Number of bins filled by the histogram measurement */
-
- VL53L0X_DeviceError ErrorStatus;
- /*!< Error status of the current measurement. \n
- see @a ::VL53L0X_DeviceError @a VL53L0X_GetStatusErrorString() */
-} VL53L0X_HistogramMeasurementData_t;
-
-#define VL53L0X_REF_SPAD_BUFFER_SIZE 6
-
-/**
- * @struct VL53L0X_SpadData_t
- * @brief Spad Configuration Data.
- */
-typedef struct {
- uint8_t RefSpadEnables[VL53L0X_REF_SPAD_BUFFER_SIZE];
- /*!< Reference Spad Enables */
- uint8_t RefGoodSpadMap[VL53L0X_REF_SPAD_BUFFER_SIZE];
- /*!< Reference Spad Good Spad Map */
-} VL53L0X_SpadData_t;
-
-typedef struct {
- FixPoint1616_t OscFrequencyMHz; /* Frequency used */
-
- uint16_t LastEncodedTimeout;
- /* last encoded Time out used for timing budget*/
-
- VL53L0X_GpioFunctionality Pin0GpioFunctionality;
- /* store the functionality of the GPIO: pin0 */
-
- uint32_t FinalRangeTimeoutMicroSecs;
- /*!< Execution time of the final range*/
- uint8_t FinalRangeVcselPulsePeriod;
- /*!< Vcsel pulse period (pll clocks) for the final range measurement*/
- uint32_t PreRangeTimeoutMicroSecs;
- /*!< Execution time of the final range*/
- uint8_t PreRangeVcselPulsePeriod;
- /*!< Vcsel pulse period (pll clocks) for the pre-range measurement*/
-
- uint16_t SigmaEstRefArray;
- /*!< Reference array sigma value in 1/100th of [mm] e.g. 100 = 1mm */
- uint16_t SigmaEstEffPulseWidth;
- /*!< Effective Pulse width for sigma estimate in 1/100th
- * of ns e.g. 900 = 9.0ns */
- uint16_t SigmaEstEffAmbWidth;
- /*!< Effective Ambient width for sigma estimate in 1/100th of ns
- * e.g. 500 = 5.0ns */
-
-
- uint8_t ReadDataFromDeviceDone; /* Indicate if read from device has
- been done (==1) or not (==0) */
- uint8_t ModuleId; /* Module ID */
- uint8_t Revision; /* test Revision */
- char ProductId[VL53L0X_MAX_STRING_LENGTH];
- /* Product Identifier String */
- uint8_t ReferenceSpadCount; /* used for ref spad management */
- uint8_t ReferenceSpadType; /* used for ref spad management */
- uint8_t RefSpadsInitialised; /* reports if ref spads are initialised. */
- uint32_t PartUIDUpper; /*!< Unique Part ID Upper */
- uint32_t PartUIDLower; /*!< Unique Part ID Lower */
- FixPoint1616_t SignalRateMeasFixed400mm; /*!< Peek Signal rate
- at 400 mm*/
-
-} VL53L0X_DeviceSpecificParameters_t;
-
-/**
- * @struct VL53L0X_DevData_t
- *
- * @brief VL53L0X PAL device ST private data structure \n
- * End user should never access any of these field directly
- *
- * These must never access directly but only via macro
- */
-typedef struct {
- VL53L0X_DMaxData_t DMaxData;
- /*!< Dmax Data */
- int32_t Part2PartOffsetNVMMicroMeter;
- /*!< backed up NVM value */
- int32_t Part2PartOffsetAdjustmentNVMMicroMeter;
- /*!< backed up NVM value representing additional offset adjustment */
- VL53L0X_DeviceParameters_t CurrentParameters;
- /*!< Current Device Parameter */
- VL53L0X_RangingMeasurementData_t LastRangeMeasure;
- /*!< Ranging Data */
- VL53L0X_HistogramMeasurementData_t LastHistogramMeasure;
- /*!< Histogram Data */
- VL53L0X_DeviceSpecificParameters_t DeviceSpecificParameters;
- /*!< Parameters specific to the device */
- VL53L0X_SpadData_t SpadData;
- /*!< Spad Data */
- uint8_t SequenceConfig;
- /*!< Internal value for the sequence config */
- uint8_t RangeFractionalEnable;
- /*!< Enable/Disable fractional part of ranging data */
- VL53L0X_State PalState;
- /*!< Current state of the PAL for this device */
- VL53L0X_PowerModes PowerMode;
- /*!< Current Power Mode */
- uint16_t SigmaEstRefArray;
- /*!< Reference array sigma value in 1/100th of [mm] e.g. 100 = 1mm */
- uint16_t SigmaEstEffPulseWidth;
- /*!< Effective Pulse width for sigma estimate in 1/100th
- * of ns e.g. 900 = 9.0ns */
- uint16_t SigmaEstEffAmbWidth;
- /*!< Effective Ambient width for sigma estimate in 1/100th of ns
- * e.g. 500 = 5.0ns */
- uint16_t targetRefRate;
- /*!< Target Ambient Rate for Ref spad management */
- FixPoint1616_t SigmaEstimate;
- /*!< Sigma Estimate - based on ambient & VCSEL rates and
- * signal_total_events */
- FixPoint1616_t SignalEstimate;
- /*!< Signal Estimate - based on ambient & VCSEL rates and cross talk */
- FixPoint1616_t LastSignalRefMcps;
- /*!< Latest Signal ref in Mcps */
- uint8_t *pTuningSettingsPointer;
- /*!< Pointer for Tuning Settings table */
- uint8_t UseInternalTuningSettings;
- /*!< Indicate if we use Tuning Settings table */
- uint16_t LinearityCorrectiveGain;
- /*!< Linearity Corrective Gain value in x1000 */
- uint16_t DmaxCalRangeMilliMeter;
- /*!< Dmax Calibration Range millimeter */
- FixPoint1616_t DmaxCalSignalRateRtnMegaCps;
- /*!< Dmax Calibration Signal Rate Return MegaCps */
-
-} VL53L0X_DevData_t;
-
-
-/** @defgroup VL53L0X_define_InterruptPolarity_group Defines the Polarity
- * of the Interrupt
- * Defines the Polarity of the Interrupt
- * @{
- */
-typedef uint8_t VL53L0X_InterruptPolarity;
-
-#define VL53L0X_INTERRUPTPOLARITY_LOW ((VL53L0X_InterruptPolarity) 0)
-/*!< Set active low polarity best setup for falling edge. */
-#define VL53L0X_INTERRUPTPOLARITY_HIGH ((VL53L0X_InterruptPolarity) 1)
-/*!< Set active high polarity best setup for rising edge. */
-
-/** @} VL53L0X_define_InterruptPolarity_group */
-
-
-/** @defgroup VL53L0X_define_VcselPeriod_group Vcsel Period Defines
- * Defines the range measurement for which to access the vcsel period.
- * @{
- */
-typedef uint8_t VL53L0X_VcselPeriod;
-
-#define VL53L0X_VCSEL_PERIOD_PRE_RANGE ((VL53L0X_VcselPeriod) 0)
-/*!<Identifies the pre-range vcsel period. */
-#define VL53L0X_VCSEL_PERIOD_FINAL_RANGE ((VL53L0X_VcselPeriod) 1)
-/*!<Identifies the final range vcsel period. */
-
-/** @} VL53L0X_define_VcselPeriod_group */
-
-/** @defgroup VL53L0X_define_SchedulerSequence_group Defines the steps
- * carried out by the scheduler during a range measurement.
- * @{
- * Defines the states of all the steps in the scheduler
- * i.e. enabled/disabled.
- */
-typedef struct {
- uint8_t TccOn; /*!<Reports if Target Centre Check On */
- uint8_t MsrcOn; /*!<Reports if MSRC On */
- uint8_t DssOn; /*!<Reports if DSS On */
- uint8_t PreRangeOn; /*!<Reports if Pre-Range On */
- uint8_t FinalRangeOn; /*!<Reports if Final-Range On */
-} VL53L0X_SchedulerSequenceSteps_t;
-
-/** @} VL53L0X_define_SchedulerSequence_group */
-
-/** @defgroup VL53L0X_define_SequenceStepId_group Defines the Polarity
- * of the Interrupt
- * Defines the the sequence steps performed during ranging..
- * @{
- */
-typedef uint8_t VL53L0X_SequenceStepId;
-
-#define VL53L0X_SEQUENCESTEP_TCC ((VL53L0X_VcselPeriod) 0)
-/*!<Target CentreCheck identifier. */
-#define VL53L0X_SEQUENCESTEP_DSS ((VL53L0X_VcselPeriod) 1)
-/*!<Dynamic Spad Selection function Identifier. */
-#define VL53L0X_SEQUENCESTEP_MSRC ((VL53L0X_VcselPeriod) 2)
-/*!<Minimum Signal Rate Check function Identifier. */
-#define VL53L0X_SEQUENCESTEP_PRE_RANGE ((VL53L0X_VcselPeriod) 3)
-/*!<Pre-Range check Identifier. */
-#define VL53L0X_SEQUENCESTEP_FINAL_RANGE ((VL53L0X_VcselPeriod) 4)
-/*!<Final Range Check Identifier. */
-
-#define VL53L0X_SEQUENCESTEP_NUMBER_OF_CHECKS 5
-/*!<Number of Sequence Step Managed by the API. */
-
-/** @} VL53L0X_define_SequenceStepId_group */
-
-
-/* MACRO Definitions */
-/** @defgroup VL53L0X_define_GeneralMacro_group General Macro Defines
- * General Macro Defines
- * @{
- */
-
-/* Defines */
-#define VL53L0X_SETPARAMETERFIELD(Dev, field, value) \
- PALDevDataSet(Dev, CurrentParameters.field, value)
-
-#define VL53L0X_GETPARAMETERFIELD(Dev, field, variable) \
- variable = PALDevDataGet(Dev, CurrentParameters).field
-
-
-#define VL53L0X_SETARRAYPARAMETERFIELD(Dev, field, index, value) \
- PALDevDataSet(Dev, CurrentParameters.field[index], value)
-
-#define VL53L0X_GETARRAYPARAMETERFIELD(Dev, field, index, variable) \
- variable = PALDevDataGet(Dev, CurrentParameters).field[index]
-
-
-#define VL53L0X_SETDEVICESPECIFICPARAMETER(Dev, field, value) \
- PALDevDataSet(Dev, DeviceSpecificParameters.field, value)
-
-#define VL53L0X_GETDEVICESPECIFICPARAMETER(Dev, field) \
- PALDevDataGet(Dev, DeviceSpecificParameters).field
-
-
-#define VL53L0X_FIXPOINT1616TOFIXPOINT97(Value) \
- (uint16_t)((Value>>9)&0xFFFF)
-#define VL53L0X_FIXPOINT97TOFIXPOINT1616(Value) \
- (FixPoint1616_t)(Value<<9)
-
-#define VL53L0X_FIXPOINT1616TOFIXPOINT88(Value) \
- (uint16_t)((Value>>8)&0xFFFF)
-#define VL53L0X_FIXPOINT88TOFIXPOINT1616(Value) \
- (FixPoint1616_t)(Value<<8)
-
-#define VL53L0X_FIXPOINT1616TOFIXPOINT412(Value) \
- (uint16_t)((Value>>4)&0xFFFF)
-#define VL53L0X_FIXPOINT412TOFIXPOINT1616(Value) \
- (FixPoint1616_t)(Value<<4)
-
-#define VL53L0X_FIXPOINT1616TOFIXPOINT313(Value) \
- (uint16_t)((Value>>3)&0xFFFF)
-#define VL53L0X_FIXPOINT313TOFIXPOINT1616(Value) \
- (FixPoint1616_t)(Value<<3)
-
-#define VL53L0X_FIXPOINT1616TOFIXPOINT08(Value) \
- (uint8_t)((Value>>8)&0x00FF)
-#define VL53L0X_FIXPOINT08TOFIXPOINT1616(Value) \
- (FixPoint1616_t)(Value<<8)
-
-#define VL53L0X_FIXPOINT1616TOFIXPOINT53(Value) \
- (uint8_t)((Value>>13)&0x00FF)
-#define VL53L0X_FIXPOINT53TOFIXPOINT1616(Value) \
- (FixPoint1616_t)(Value<<13)
-
-#define VL53L0X_FIXPOINT1616TOFIXPOINT102(Value) \
- (uint16_t)((Value>>14)&0x0FFF)
-#define VL53L0X_FIXPOINT102TOFIXPOINT1616(Value) \
- (FixPoint1616_t)(Value<<12)
-
-#define VL53L0X_MAKEUINT16(lsb, msb) (uint16_t)((((uint16_t)msb)<<8) + \
- (uint16_t)lsb)
-
-/** @} VL53L0X_define_GeneralMacro_group */
-
-/** @} VL53L0X_globaldefine_group */
-
-
-
-
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _VL53L0X_DEF_H_ */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_device.h b/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_device.h
deleted file mode 100644
index 20842e60f..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_device.h
+++ /dev/null
@@ -1,243 +0,0 @@
-/**
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2019-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/**
- * Device specific defines. To be adapted by implementer for the targeted
- * device.
- */
-
-#ifndef _VL53L0X_DEVICE_H_
-#define _VL53L0X_DEVICE_H_
-
-#include "vl53l0x_types.h"
-
-
-/** @defgroup VL53L0X_DevSpecDefines_group VL53L0X cut1.1 Device Specific Defines
- * @brief VL53L0X cut1.1 Device Specific Defines
- * @{
- */
-
-
-/** @defgroup VL53L0X_DeviceError_group Device Error
- * @brief Device Error code
- *
- * This enum is Device specific it should be updated in the implementation
- * Use @a VL53L0X_GetStatusErrorString() to get the string.
- * It is related to Status Register of the Device.
- * @{
- */
-typedef uint8_t VL53L0X_DeviceError;
-
-#define VL53L0X_DEVICEERROR_NONE ((VL53L0X_DeviceError) 0)
- /*!< 0 NoError */
-#define VL53L0X_DEVICEERROR_VCSELCONTINUITYTESTFAILURE ((VL53L0X_DeviceError) 1)
-#define VL53L0X_DEVICEERROR_VCSELWATCHDOGTESTFAILURE ((VL53L0X_DeviceError) 2)
-#define VL53L0X_DEVICEERROR_NOVHVVALUEFOUND ((VL53L0X_DeviceError) 3)
-#define VL53L0X_DEVICEERROR_MSRCNOTARGET ((VL53L0X_DeviceError) 4)
-#define VL53L0X_DEVICEERROR_SNRCHECK ((VL53L0X_DeviceError) 5)
-#define VL53L0X_DEVICEERROR_RANGEPHASECHECK ((VL53L0X_DeviceError) 6)
-#define VL53L0X_DEVICEERROR_SIGMATHRESHOLDCHECK ((VL53L0X_DeviceError) 7)
-#define VL53L0X_DEVICEERROR_TCC ((VL53L0X_DeviceError) 8)
-#define VL53L0X_DEVICEERROR_PHASECONSISTENCY ((VL53L0X_DeviceError) 9)
-#define VL53L0X_DEVICEERROR_MINCLIP ((VL53L0X_DeviceError) 10)
-#define VL53L0X_DEVICEERROR_RANGECOMPLETE ((VL53L0X_DeviceError) 11)
-#define VL53L0X_DEVICEERROR_ALGOUNDERFLOW ((VL53L0X_DeviceError) 12)
-#define VL53L0X_DEVICEERROR_ALGOOVERFLOW ((VL53L0X_DeviceError) 13)
-#define VL53L0X_DEVICEERROR_RANGEIGNORETHRESHOLD ((VL53L0X_DeviceError) 14)
-
-/** @} end of VL53L0X_DeviceError_group */
-
-
-/** @defgroup VL53L0X_CheckEnable_group Check Enable list
- * @brief Check Enable code
- *
- * Define used to specify the LimitCheckId.
- * Use @a VL53L0X_GetLimitCheckInfo() to get the string.
- * @{
- */
-
-#define VL53L0X_CHECKENABLE_SIGMA_FINAL_RANGE 0
-#define VL53L0X_CHECKENABLE_SIGNAL_RATE_FINAL_RANGE 1
-#define VL53L0X_CHECKENABLE_SIGNAL_REF_CLIP 2
-#define VL53L0X_CHECKENABLE_RANGE_IGNORE_THRESHOLD 3
-#define VL53L0X_CHECKENABLE_SIGNAL_RATE_MSRC 4
-#define VL53L0X_CHECKENABLE_SIGNAL_RATE_PRE_RANGE 5
-
-#define VL53L0X_CHECKENABLE_NUMBER_OF_CHECKS 6
-
-/** @} end of VL53L0X_CheckEnable_group */
-
-
-/** @defgroup VL53L0X_GpioFunctionality_group Gpio Functionality
- * @brief Defines the different functionalities for the device GPIO(s)
- * @{
- */
-typedef uint8_t VL53L0X_GpioFunctionality;
-
-#define VL53L0X_GPIOFUNCTIONALITY_OFF \
- ((VL53L0X_GpioFunctionality) 0) /*!< NO Interrupt */
-#define VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_LOW \
- ((VL53L0X_GpioFunctionality) 1) /*!< Level Low (value < thresh_low) */
-#define VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_HIGH \
- ((VL53L0X_GpioFunctionality) 2) /*!< Level High (value > thresh_high) */
-#define VL53L0X_GPIOFUNCTIONALITY_THRESHOLD_CROSSED_OUT \
- ((VL53L0X_GpioFunctionality) 3)
- /*!< Out Of Window (value < thresh_low OR value > thresh_high) */
-#define VL53L0X_GPIOFUNCTIONALITY_NEW_MEASURE_READY \
- ((VL53L0X_GpioFunctionality) 4) /*!< New Sample Ready */
-
-/** @} end of VL53L0X_GpioFunctionality_group */
-
-
-/* Device register map */
-
-/** @defgroup VL53L0X_DefineRegisters_group Define Registers
- * @brief List of all the defined registers
- * @{
- */
-#define VL53L0X_REG_SYSRANGE_START 0x000
- /** mask existing bit in #VL53L0X_REG_SYSRANGE_START*/
- #define VL53L0X_REG_SYSRANGE_MODE_MASK 0x0F
- /** bit 0 in #VL53L0X_REG_SYSRANGE_START write 1 toggle state in
- * continuous mode and arm next shot in single shot mode */
- #define VL53L0X_REG_SYSRANGE_MODE_START_STOP 0x01
- /** bit 1 write 0 in #VL53L0X_REG_SYSRANGE_START set single shot mode */
- #define VL53L0X_REG_SYSRANGE_MODE_SINGLESHOT 0x00
- /** bit 1 write 1 in #VL53L0X_REG_SYSRANGE_START set back-to-back
- * operation mode */
- #define VL53L0X_REG_SYSRANGE_MODE_BACKTOBACK 0x02
- /** bit 2 write 1 in #VL53L0X_REG_SYSRANGE_START set timed operation
- * mode */
- #define VL53L0X_REG_SYSRANGE_MODE_TIMED 0x04
- /** bit 3 write 1 in #VL53L0X_REG_SYSRANGE_START set histogram operation
- * mode */
- #define VL53L0X_REG_SYSRANGE_MODE_HISTOGRAM 0x08
-
-
-#define VL53L0X_REG_SYSTEM_THRESH_HIGH 0x000C
-#define VL53L0X_REG_SYSTEM_THRESH_LOW 0x000E
-
-
-#define VL53L0X_REG_SYSTEM_SEQUENCE_CONFIG 0x0001
-#define VL53L0X_REG_SYSTEM_RANGE_CONFIG 0x0009
-#define VL53L0X_REG_SYSTEM_INTERMEASUREMENT_PERIOD 0x0004
-
-
-#define VL53L0X_REG_SYSTEM_INTERRUPT_CONFIG_GPIO 0x000A
- #define VL53L0X_REG_SYSTEM_INTERRUPT_GPIO_DISABLED 0x00
- #define VL53L0X_REG_SYSTEM_INTERRUPT_GPIO_LEVEL_LOW 0x01
- #define VL53L0X_REG_SYSTEM_INTERRUPT_GPIO_LEVEL_HIGH 0x02
- #define VL53L0X_REG_SYSTEM_INTERRUPT_GPIO_OUT_OF_WINDOW 0x03
- #define VL53L0X_REG_SYSTEM_INTERRUPT_GPIO_NEW_SAMPLE_READY 0x04
-
-#define VL53L0X_REG_GPIO_HV_MUX_ACTIVE_HIGH 0x0084
-
-
-#define VL53L0X_REG_SYSTEM_INTERRUPT_CLEAR 0x000B
-
-/* Result registers */
-#define VL53L0X_REG_RESULT_INTERRUPT_STATUS 0x0013
-#define VL53L0X_REG_RESULT_RANGE_STATUS 0x0014
-
-#define VL53L0X_REG_RESULT_CORE_PAGE 1
-#define VL53L0X_REG_RESULT_CORE_AMBIENT_WINDOW_EVENTS_RTN 0x00BC
-#define VL53L0X_REG_RESULT_CORE_RANGING_TOTAL_EVENTS_RTN 0x00C0
-#define VL53L0X_REG_RESULT_CORE_AMBIENT_WINDOW_EVENTS_REF 0x00D0
-#define VL53L0X_REG_RESULT_CORE_RANGING_TOTAL_EVENTS_REF 0x00D4
-#define VL53L0X_REG_RESULT_PEAK_SIGNAL_RATE_REF 0x00B6
-
-/* Algo register */
-
-#define VL53L0X_REG_ALGO_PART_TO_PART_RANGE_OFFSET_MM 0x0028
-
-#define VL53L0X_REG_I2C_SLAVE_DEVICE_ADDRESS 0x008a
-
-/* Check Limit registers */
-#define VL53L0X_REG_MSRC_CONFIG_CONTROL 0x0060
-
-#define VL53L0X_REG_PRE_RANGE_CONFIG_MIN_SNR 0X0027
-#define VL53L0X_REG_PRE_RANGE_CONFIG_VALID_PHASE_LOW 0x0056
-#define VL53L0X_REG_PRE_RANGE_CONFIG_VALID_PHASE_HIGH 0x0057
-#define VL53L0X_REG_PRE_RANGE_MIN_COUNT_RATE_RTN_LIMIT 0x0064
-
-#define VL53L0X_REG_FINAL_RANGE_CONFIG_MIN_SNR 0X0067
-#define VL53L0X_REG_FINAL_RANGE_CONFIG_VALID_PHASE_LOW 0x0047
-#define VL53L0X_REG_FINAL_RANGE_CONFIG_VALID_PHASE_HIGH 0x0048
-#define VL53L0X_REG_FINAL_RANGE_CONFIG_MIN_COUNT_RATE_RTN_LIMIT 0x0044
-
-
-#define VL53L0X_REG_PRE_RANGE_CONFIG_SIGMA_THRESH_HI 0X0061
-#define VL53L0X_REG_PRE_RANGE_CONFIG_SIGMA_THRESH_LO 0X0062
-
-/* PRE RANGE registers */
-#define VL53L0X_REG_PRE_RANGE_CONFIG_VCSEL_PERIOD 0x0050
-#define VL53L0X_REG_PRE_RANGE_CONFIG_TIMEOUT_MACROP_HI 0x0051
-#define VL53L0X_REG_PRE_RANGE_CONFIG_TIMEOUT_MACROP_LO 0x0052
-
-#define VL53L0X_REG_SYSTEM_HISTOGRAM_BIN 0x0081
-#define VL53L0X_REG_HISTOGRAM_CONFIG_INITIAL_PHASE_SELECT 0x0033
-#define VL53L0X_REG_HISTOGRAM_CONFIG_READOUT_CTRL 0x0055
-
-#define VL53L0X_REG_FINAL_RANGE_CONFIG_VCSEL_PERIOD 0x0070
-#define VL53L0X_REG_FINAL_RANGE_CONFIG_TIMEOUT_MACROP_HI 0x0071
-#define VL53L0X_REG_FINAL_RANGE_CONFIG_TIMEOUT_MACROP_LO 0x0072
-#define VL53L0X_REG_CROSSTALK_COMPENSATION_PEAK_RATE_MCPS 0x0020
-
-#define VL53L0X_REG_MSRC_CONFIG_TIMEOUT_MACROP 0x0046
-
-
-#define VL53L0X_REG_SOFT_RESET_GO2_SOFT_RESET_N 0x00bf
-#define VL53L0X_REG_IDENTIFICATION_MODEL_ID 0x00c0
-#define VL53L0X_REG_IDENTIFICATION_REVISION_ID 0x00c2
-
-#define VL53L0X_REG_OSC_CALIBRATE_VAL 0x00f8
-
-
-#define VL53L0X_SIGMA_ESTIMATE_MAX_VALUE 65535
-/* equivalent to a range sigma of 655.35mm */
-
-#define VL53L0X_REG_GLOBAL_CONFIG_VCSEL_WIDTH 0x032
-#define VL53L0X_REG_GLOBAL_CONFIG_SPAD_ENABLES_REF_0 0x0B0
-#define VL53L0X_REG_GLOBAL_CONFIG_SPAD_ENABLES_REF_1 0x0B1
-#define VL53L0X_REG_GLOBAL_CONFIG_SPAD_ENABLES_REF_2 0x0B2
-#define VL53L0X_REG_GLOBAL_CONFIG_SPAD_ENABLES_REF_3 0x0B3
-#define VL53L0X_REG_GLOBAL_CONFIG_SPAD_ENABLES_REF_4 0x0B4
-#define VL53L0X_REG_GLOBAL_CONFIG_SPAD_ENABLES_REF_5 0x0B5
-
-#define VL53L0X_REG_GLOBAL_CONFIG_REF_EN_START_SELECT 0xB6
-#define VL53L0X_REG_DYNAMIC_SPAD_NUM_REQUESTED_REF_SPAD 0x4E /* 0x14E */
-#define VL53L0X_REG_DYNAMIC_SPAD_REF_EN_START_OFFSET 0x4F /* 0x14F */
-#define VL53L0X_REG_POWER_MANAGEMENT_GO1_POWER_FORCE 0x80
-
-/*
- * Speed of light in um per 1E-10 Seconds
- */
-
-#define VL53L0X_SPEED_OF_LIGHT_IN_AIR 2997
-
-#define VL53L0X_REG_VHV_CONFIG_PAD_SCL_SDA__EXTSUP_HV 0x0089
-
-#define VL53L0X_REG_ALGO_PHASECAL_LIM 0x0030 /* 0x130 */
-#define VL53L0X_REG_ALGO_PHASECAL_CONFIG_TIMEOUT 0x0030
-
-/** @} VL53L0X_DefineRegisters_group */
-
-/** @} VL53L0X_DevSpecDefines_group */
-
-
-#endif
-
-/* _VL53L0X_DEVICE_H_ */
-
-
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_interrupt_threshold_settings.h b/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_interrupt_threshold_settings.h
deleted file mode 100644
index 3ee4534cf..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_interrupt_threshold_settings.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/**
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2019-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-#ifndef _VL53L0X_INTERRUPT_THRESHOLD_SETTINGS_H_
-#define _VL53L0X_INTERRUPT_THRESHOLD_SETTINGS_H_
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-uint8_t InterruptThresholdSettings[] = {
-
- /* Start of Interrupt Threshold Settings */
- 0x1, 0xff, 0x00,
- 0x1, 0x80, 0x01,
- 0x1, 0xff, 0x01,
- 0x1, 0x00, 0x00,
- 0x1, 0xff, 0x01,
- 0x1, 0x4f, 0x02,
- 0x1, 0xFF, 0x0E,
- 0x1, 0x00, 0x03,
- 0x1, 0x01, 0x84,
- 0x1, 0x02, 0x0A,
- 0x1, 0x03, 0x03,
- 0x1, 0x04, 0x08,
- 0x1, 0x05, 0xC8,
- 0x1, 0x06, 0x03,
- 0x1, 0x07, 0x8D,
- 0x1, 0x08, 0x08,
- 0x1, 0x09, 0xC6,
- 0x1, 0x0A, 0x01,
- 0x1, 0x0B, 0x02,
- 0x1, 0x0C, 0x00,
- 0x1, 0x0D, 0xD5,
- 0x1, 0x0E, 0x18,
- 0x1, 0x0F, 0x12,
- 0x1, 0x10, 0x01,
- 0x1, 0x11, 0x82,
- 0x1, 0x12, 0x00,
- 0x1, 0x13, 0xD5,
- 0x1, 0x14, 0x18,
- 0x1, 0x15, 0x13,
- 0x1, 0x16, 0x03,
- 0x1, 0x17, 0x86,
- 0x1, 0x18, 0x0A,
- 0x1, 0x19, 0x09,
- 0x1, 0x1A, 0x08,
- 0x1, 0x1B, 0xC2,
- 0x1, 0x1C, 0x03,
- 0x1, 0x1D, 0x8F,
- 0x1, 0x1E, 0x0A,
- 0x1, 0x1F, 0x06,
- 0x1, 0x20, 0x01,
- 0x1, 0x21, 0x02,
- 0x1, 0x22, 0x00,
- 0x1, 0x23, 0xD5,
- 0x1, 0x24, 0x18,
- 0x1, 0x25, 0x22,
- 0x1, 0x26, 0x01,
- 0x1, 0x27, 0x82,
- 0x1, 0x28, 0x00,
- 0x1, 0x29, 0xD5,
- 0x1, 0x2A, 0x18,
- 0x1, 0x2B, 0x0B,
- 0x1, 0x2C, 0x28,
- 0x1, 0x2D, 0x78,
- 0x1, 0x2E, 0x28,
- 0x1, 0x2F, 0x91,
- 0x1, 0x30, 0x00,
- 0x1, 0x31, 0x0B,
- 0x1, 0x32, 0x00,
- 0x1, 0x33, 0x0B,
- 0x1, 0x34, 0x00,
- 0x1, 0x35, 0xA1,
- 0x1, 0x36, 0x00,
- 0x1, 0x37, 0xA0,
- 0x1, 0x38, 0x00,
- 0x1, 0x39, 0x04,
- 0x1, 0x3A, 0x28,
- 0x1, 0x3B, 0x30,
- 0x1, 0x3C, 0x0C,
- 0x1, 0x3D, 0x04,
- 0x1, 0x3E, 0x0F,
- 0x1, 0x3F, 0x79,
- 0x1, 0x40, 0x28,
- 0x1, 0x41, 0x1E,
- 0x1, 0x42, 0x2F,
- 0x1, 0x43, 0x87,
- 0x1, 0x44, 0x00,
- 0x1, 0x45, 0x0B,
- 0x1, 0x46, 0x00,
- 0x1, 0x47, 0x0B,
- 0x1, 0x48, 0x00,
- 0x1, 0x49, 0xA7,
- 0x1, 0x4A, 0x00,
- 0x1, 0x4B, 0xA6,
- 0x1, 0x4C, 0x00,
- 0x1, 0x4D, 0x04,
- 0x1, 0x4E, 0x01,
- 0x1, 0x4F, 0x00,
- 0x1, 0x50, 0x00,
- 0x1, 0x51, 0x80,
- 0x1, 0x52, 0x09,
- 0x1, 0x53, 0x08,
- 0x1, 0x54, 0x01,
- 0x1, 0x55, 0x00,
- 0x1, 0x56, 0x0F,
- 0x1, 0x57, 0x79,
- 0x1, 0x58, 0x09,
- 0x1, 0x59, 0x05,
- 0x1, 0x5A, 0x00,
- 0x1, 0x5B, 0x60,
- 0x1, 0x5C, 0x05,
- 0x1, 0x5D, 0xD1,
- 0x1, 0x5E, 0x0C,
- 0x1, 0x5F, 0x3C,
- 0x1, 0x60, 0x00,
- 0x1, 0x61, 0xD0,
- 0x1, 0x62, 0x0B,
- 0x1, 0x63, 0x03,
- 0x1, 0x64, 0x28,
- 0x1, 0x65, 0x10,
- 0x1, 0x66, 0x2A,
- 0x1, 0x67, 0x39,
- 0x1, 0x68, 0x0B,
- 0x1, 0x69, 0x02,
- 0x1, 0x6A, 0x28,
- 0x1, 0x6B, 0x10,
- 0x1, 0x6C, 0x2A,
- 0x1, 0x6D, 0x61,
- 0x1, 0x6E, 0x0C,
- 0x1, 0x6F, 0x00,
- 0x1, 0x70, 0x0F,
- 0x1, 0x71, 0x79,
- 0x1, 0x72, 0x00,
- 0x1, 0x73, 0x0B,
- 0x1, 0x74, 0x00,
- 0x1, 0x75, 0x0B,
- 0x1, 0x76, 0x00,
- 0x1, 0x77, 0xA1,
- 0x1, 0x78, 0x00,
- 0x1, 0x79, 0xA0,
- 0x1, 0x7A, 0x00,
- 0x1, 0x7B, 0x04,
- 0x1, 0xFF, 0x04,
- 0x1, 0x79, 0x1D,
- 0x1, 0x7B, 0x27,
- 0x1, 0x96, 0x0E,
- 0x1, 0x97, 0xFE,
- 0x1, 0x98, 0x03,
- 0x1, 0x99, 0xEF,
- 0x1, 0x9A, 0x02,
- 0x1, 0x9B, 0x44,
- 0x1, 0x73, 0x07,
- 0x1, 0x70, 0x01,
- 0x1, 0xff, 0x01,
- 0x1, 0x00, 0x01,
- 0x1, 0xff, 0x00,
- 0x00, 0x00, 0x00
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _VL53L0X_INTERRUPT_THRESHOLD_SETTINGS_H_ */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_platform.h b/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_platform.h
deleted file mode 100644
index c4c3a12f8..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_platform.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- ******************************************************************************
- * @file vl53l0x_platform.h
- * @author MCD Application Team
- * @brief VL53l0x platform include file
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2017(-2021) STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __VL53L0X_PLATFORM_H
-#define __VL53L0X_PLATFORM_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32wbxx_hal.h"
-#include "vl53l0x_def.h"
-#include "vl53l0x_platform_log.h"
-#include "vl53l0x_tof.h"
-
-/* Exported types ------------------------------------------------------------*/
-/* Exported constants --------------------------------------------------------*/
-/* Exported macros -----------------------------------------------------------*/
-/* Private macros ------------------------------------------------------------*/
-/* Exported functions --------------------------------------------------------*/
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __VL53L0X_PLATFORM_H */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_platform_log.c b/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_platform_log.c
deleted file mode 100644
index 462707df1..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_platform_log.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * COPYRIGHT (C) STMicroelectronics 2015. All rights reserved.
- *
- * This software is the confidential and proprietary information of
- * STMicroelectronics ("Confidential Information"). You shall not
- * disclose such Confidential Information and shall use it only in
- * accordance with the terms of the license agreement you entered into
- * with STMicroelectronics
- *
- * Programming Golden Rule: Keep it Simple!
- *
- */
-
-/*!
- * \file VL53L0X_platform_log.c
- * \brief Code function definitions for Ewok Platform Layer
- *
- */
-
-
-#include <stdio.h> // sprintf(), vsnprintf(), printf()
-#include <stdarg.h> // sprintf(), vsnprintf(), printf()
-#ifdef _MSC_VER
-#define snprintf _snprintf
-#endif
-
-#include "vl53l0x_def.h"
-#include "vl53l0x_platform_log.h"
-
-
-uint32_t _trace_level = TRACE_LEVEL_WARNING;
-uint32_t _trace_modules = TRACE_MODULE_NONE;
-uint32_t _trace_functions = TRACE_FUNCTION_NONE;
-
-#if defined(VL53L0X_LOG_ENABLE) && (TRACE_UART==1)
-int32_t VL53L0X_trace_config(char *filename, uint32_t modules, uint32_t level, uint32_t functions)
-{
- int STATUS = 0;
-
- _trace_functions = functions;
- _trace_level = level;
- _trace_modules = modules;
-
- return STATUS;
-}
-
-
-void trace_print_module_function(uint32_t module, uint32_t level, uint32_t function, const char *format, ...)
-{
- if ( ((level <=_trace_level) && ((module & _trace_modules) > 0))
- || ((function & _trace_functions) > 0) )
- {
- va_list arg_list;
- va_start(arg_list, format);
- trace_vprintf( format, arg_list);
- va_end(arg_list);
- }
-}
-#endif
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_platform_log.h b/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_platform_log.h
deleted file mode 100644
index 07d2b0643..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_platform_log.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- ******************************************************************************
- * @file vl53l0x_platform_log.h
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2017(-2021) STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-#ifndef _VL53L0X_PLATFORM_LOG_H_
-#define _VL53L0X_PLATFORM_LOG_H_
-
-#include <stdio.h>
-#include <string.h>
-/* LOG Functions */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/**
- * @file vl53l0x_platform_log.h
- *
- * @brief platform log function definition
- */
-
-//#define VL53L0X_LOG_ENABLE 0
-
-enum {
- TRACE_LEVEL_NONE,
- TRACE_LEVEL_ERRORS,
- TRACE_LEVEL_WARNING,
- TRACE_LEVEL_INFO,
- TRACE_LEVEL_DEBUG,
- TRACE_LEVEL_ALL,
- TRACE_LEVEL_IGNORE
-};
-
-enum {
- TRACE_FUNCTION_NONE = 0,
- TRACE_FUNCTION_I2C = 1,
- TRACE_FUNCTION_ALL = 0x7fffffff //all bits except sign
-};
-
-enum {
- TRACE_MODULE_NONE = 0x0,
- TRACE_MODULE_API = 0x1,
- TRACE_MODULE_PLATFORM = 0x2,
- TRACE_MODULE_ALL = 0x7fffffff //all bits except sign
-};
-
-
-#if defined(VL53L0X_LOG_ENABLE) && (TRACE_UART==1)
-
-#include <stdarg.h>
-extern int uart_printf(const char *msg, ...);
-extern int uart_vprintf(const char *msg, va_list ap);
-
-#define trace_printf uart_printf
-#define trace_vprintf uart_vprintf
-
-
-extern uint32_t _trace_level;
-
-
-
-int32_t VL53L0X_trace_config(char *filename, uint32_t modules, uint32_t level, uint32_t functions);
-void trace_print_module_function(uint32_t module, uint32_t level, uint32_t function, const char *format, ...);
-
-
-//extern FILE * log_file;
-
-#define LOG_GET_TIME() (int)HAL_GetTick()
-
-#define _LOG_FUNCTION_START(module, fmt, ... ) \
- trace_print_module_function(module, _trace_level, TRACE_FUNCTION_ALL, "%ld <START> %s "fmt"\n", LOG_GET_TIME(), __FUNCTION__, ##__VA_ARGS__);
-
-#define _LOG_FUNCTION_END(module, status, ... )\
- trace_print_module_function(module, _trace_level, TRACE_FUNCTION_ALL, "%d <END> %s %d\n", LOG_GET_TIME(), __FUNCTION__, (int)status, ##__VA_ARGS__)
-
-#define _LOG_FUNCTION_END_FMT(module, status, fmt, ... )\
- trace_print_module_function(module, _trace_level, TRACE_FUNCTION_ALL, "%d <END> %s %d "fmt"\n", LOG_GET_TIME(), __FUNCTION__, (int)status,##__VA_ARGS__)
-
-
-#else /* VL53L0X_LOG_ENABLE no logging or no TRACE_UART */
- #define VL53L0X_ErrLog(...) (void)0
- #define _LOG_FUNCTION_START(module, fmt, ... ) (void)0
- #define _LOG_FUNCTION_END(module, status, ... ) (void)0
- #define _LOG_FUNCTION_END_FMT(module, status, fmt, ... ) (void)0
- #define trace_vprintf(...) (void)0
- #define VL53L0X_trace_config(...) (void)0
-
-#endif /* else */
-
-#define VL53L0_COPYSTRING(str, ...) strcpy(str, ##__VA_ARGS__)
-#ifdef __cplusplus
-}
-#endif
-#endif /* _VL53L0X_PLATFORM_LOG_H_ */
-
-
-
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_tof.c b/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_tof.c
deleted file mode 100644
index 9ef7bc0f7..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_tof.c
+++ /dev/null
@@ -1,330 +0,0 @@
-/**
- ******************************************************************************
- * @file vl53l0x_tof.c
- * @author MCD Application Team
- * @brief STM32L475E-IOT01 board support package
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2017(-2021) STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Includes ------------------------------------------------------------------*/
-#include <string.h>
-#include "stm32wbxx_hal.h"
-#include "vl53l0x_def.h"
-#include "vl53l0x_api.h"
-
-#include "vl53l0x_tof.h"
-
-/* Private typedef -----------------------------------------------------------*/
-/* Private define ------------------------------------------------------------*/
-#define I2C_TIME_OUT_BASE 10
-#define I2C_TIME_OUT_BYTE 1
-
-#define VL53L0X_OsDelay(...) HAL_Delay(2)
-
-/* Private macro -------------------------------------------------------------*/
-/* Private variables ---------------------------------------------------------*/
-/* Private function prototypes -----------------------------------------------*/
-int _I2CWrite(VL53L0X_DEV Dev, uint8_t *pdata, uint32_t count);
-int _I2CRead(VL53L0X_DEV Dev, uint8_t *pdata, uint32_t count);
-/* Exported functions --------------------------------------------------------*/
-
-int _I2CWrite(VL53L0X_DEV Dev, uint8_t *pdata, uint32_t count) {
- int status;
- int i2c_time_out = I2C_TIME_OUT_BASE+ count* I2C_TIME_OUT_BYTE;
-
- status = HAL_I2C_Master_Transmit(Dev->I2cHandle, Dev->I2cDevAddr, pdata, count, i2c_time_out);
-
- return status;
-}
-
-int _I2CRead(VL53L0X_DEV Dev, uint8_t *pdata, uint32_t count) {
- int status;
- int i2c_time_out = I2C_TIME_OUT_BASE+ count* I2C_TIME_OUT_BYTE;
-
- status = HAL_I2C_Master_Receive(Dev->I2cHandle, Dev->I2cDevAddr|1, pdata, count, i2c_time_out);
-
- return status;
-}
-
-VL53L0X_Error VL53L0X_RdByte(VL53L0X_DEV Dev, uint8_t index, uint8_t *data) {
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- int32_t status_int;
-
- status_int = _I2CWrite(Dev, &index, 1);
-
- if( status_int ){
- Status = VL53L0X_ERROR_CONTROL_INTERFACE;
- goto done;
- }
-
- status_int = _I2CRead(Dev, data, 1);
-
- if (status_int != 0) {
- Status = VL53L0X_ERROR_CONTROL_INTERFACE;
- }
-done:
- return Status;
-}
-
-uint8_t _I2CBuffer[64];
-
-
-// the ranging_sensor_comms.dll will take care of the page selection
-VL53L0X_Error VL53L0X_WriteMulti(VL53L0X_DEV Dev, uint8_t index, uint8_t *pdata, uint32_t count) {
- int status_int;
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
-
- if (count > sizeof(_I2CBuffer) - 1) {
- return VL53L0X_ERROR_INVALID_PARAMS;
- }
-
- _I2CBuffer[0] = index;
- memcpy(&_I2CBuffer[1], pdata, count);
-
- status_int = _I2CWrite(Dev, _I2CBuffer, count + 1);
-
- if (status_int != 0) {
- Status = VL53L0X_ERROR_CONTROL_INTERFACE;
- }
-
- return Status;
-}
-
-// the ranging_sensor_comms.dll will take care of the page selection
-VL53L0X_Error VL53L0X_ReadMulti(VL53L0X_DEV Dev, uint8_t index, uint8_t *pdata, uint32_t count) {
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- int32_t status_int;
-
- status_int = _I2CWrite(Dev, &index, 1);
-
- if (status_int != 0) {
- Status = VL53L0X_ERROR_CONTROL_INTERFACE;
- goto done;
- }
-
- status_int = _I2CRead(Dev, pdata, count);
-
- if (status_int != 0) {
- Status = VL53L0X_ERROR_CONTROL_INTERFACE;
- }
-done:
- return Status;
-}
-
-
-VL53L0X_Error VL53L0X_RdWord(VL53L0X_DEV Dev, uint8_t index, uint16_t *data) {
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- int32_t status_int;
-
- status_int = _I2CWrite(Dev, &index, 1);
-
- if( status_int ){
- Status = VL53L0X_ERROR_CONTROL_INTERFACE;
- goto done;
- }
-
- status_int = _I2CRead(Dev, _I2CBuffer, 2);
-
- if (status_int != 0) {
- Status = VL53L0X_ERROR_CONTROL_INTERFACE;
- goto done;
- }
-
- *data = ((uint16_t)_I2CBuffer[0]<<8) + (uint16_t)_I2CBuffer[1];
-done:
- return Status;
-}
-
-VL53L0X_Error VL53L0X_RdDWord(VL53L0X_DEV Dev, uint8_t index, uint32_t *data) {
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- int32_t status_int;
-
- status_int = _I2CWrite(Dev, &index, 1);
-
- if (status_int != 0) {
- Status = VL53L0X_ERROR_CONTROL_INTERFACE;
- goto done;
- }
-
- status_int = _I2CRead(Dev, _I2CBuffer, 4);
-
- if (status_int != 0) {
- Status = VL53L0X_ERROR_CONTROL_INTERFACE;
- goto done;
- }
-
- *data = ((uint32_t)_I2CBuffer[0]<<24) + ((uint32_t)_I2CBuffer[1]<<16) + ((uint32_t)_I2CBuffer[2]<<8) + (uint32_t)_I2CBuffer[3];
-
-done:
- return Status;
-}
-
-VL53L0X_Error VL53L0X_WrByte(VL53L0X_DEV Dev, uint8_t index, uint8_t data) {
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- int32_t status_int;
-
- _I2CBuffer[0] = index;
- _I2CBuffer[1] = data;
-
- status_int = _I2CWrite(Dev, _I2CBuffer, 2);
-
- if (status_int != 0) {
- Status = VL53L0X_ERROR_CONTROL_INTERFACE;
- }
-
- return Status;
-}
-
-VL53L0X_Error VL53L0X_WrWord(VL53L0X_DEV Dev, uint8_t index, uint16_t data) {
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- int32_t status_int;
-
- _I2CBuffer[0] = index;
- _I2CBuffer[1] = data >> 8;
- _I2CBuffer[2] = data & 0x00FF;
-
- status_int = _I2CWrite(Dev, _I2CBuffer, 3);
-
- if (status_int != 0) {
- Status = VL53L0X_ERROR_CONTROL_INTERFACE;
- }
-
- return Status;
-}
-
-VL53L0X_Error VL53L0X_UpdateByte(VL53L0X_DEV Dev, uint8_t index, uint8_t AndData, uint8_t OrData) {
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- uint8_t data;
-
- Status = VL53L0X_RdByte(Dev, index, &data);
-
- if (Status) {
- goto done;
- }
-
- data = (data & AndData) | OrData;
- Status = VL53L0X_WrByte(Dev, index, data);
-done:
- return Status;
-}
-
-VL53L0X_Error VL53L0X_WrDWord(VL53L0X_DEV Dev, uint8_t index, uint32_t data) {
- VL53L0X_Error Status = VL53L0X_ERROR_NONE;
- int32_t status_int;
- _I2CBuffer[0] = index;
- _I2CBuffer[1] = (data >> 24) & 0xFF;
- _I2CBuffer[2] = (data >> 16) & 0xFF;
- _I2CBuffer[3] = (data >> 8) & 0xFF;
- _I2CBuffer[4] = (data >> 0 ) & 0xFF;
-
- status_int = _I2CWrite(Dev, _I2CBuffer, 5);
- if (status_int != 0) {
- Status = VL53L0X_ERROR_CONTROL_INTERFACE;
- }
-
- return Status;
-}
-
-VL53L0X_Error VL53L0X_PollingDelay(VL53L0X_DEV Dev) {
- VL53L0X_Error status = VL53L0X_ERROR_NONE;
-
- // do nothing
- VL53L0X_OsDelay();
- return status;
-}
-
-/**
- * Setup all detected sensors for single shot mode and setup ranging configuration
- */
-void SetupSingleShot(VL53L0X_Dev_t Dev)
-{
- int status;
- uint8_t VhvSettings;
- uint8_t PhaseCal;
- uint32_t refSpadCount;
- uint8_t isApertureSpads;
- FixPoint1616_t signalLimit = (FixPoint1616_t)(0.25*65536);
- FixPoint1616_t sigmaLimit = (FixPoint1616_t)(18*65536);
- uint32_t timingBudget = 33000;
- uint8_t preRangeVcselPeriod = 14;
- uint8_t finalRangeVcselPeriod = 10;
-
-
- if( Dev.Present){
- status=VL53L0X_StaticInit(&Dev);
- if( status ){
- printf("VL53L0X_StaticInit failed\n");
- }
-
-
- status = VL53L0X_PerformRefCalibration(&Dev, &VhvSettings, &PhaseCal);
- if( status ){
- printf("VL53L0X_PerformRefCalibration failed\n");
- }
-
- status = VL53L0X_PerformRefSpadManagement(&Dev, &refSpadCount, &isApertureSpads);
- if( status ){
- printf("VL53L0X_PerformRefSpadManagement failed\n");
- }
-
- status = VL53L0X_SetDeviceMode(&Dev, VL53L0X_DEVICEMODE_SINGLE_RANGING); // Setup in single ranging mode
- if( status ){
- printf("VL53L0X_SetDeviceMode failed\n");
- }
-
- status = VL53L0X_SetLimitCheckEnable(&Dev, VL53L0X_CHECKENABLE_SIGMA_FINAL_RANGE, 1); // Enable Sigma limit
- if( status ){
- printf("VL53L0X_SetLimitCheckEnable failed\n");
- }
-
- status = VL53L0X_SetLimitCheckEnable(&Dev, VL53L0X_CHECKENABLE_SIGNAL_RATE_FINAL_RANGE, 1); // Enable Signa limit
- if( status ){
- printf("VL53L0X_SetLimitCheckEnable failed\n");
- }
-
- /* Ranging configuration */
- signalLimit = (FixPoint1616_t)(0.1*65536);
- sigmaLimit = (FixPoint1616_t)(60*65536);
- timingBudget = 33000;
- preRangeVcselPeriod = 18;
- finalRangeVcselPeriod = 14;
-
- status = VL53L0X_SetLimitCheckValue(&Dev, VL53L0X_CHECKENABLE_SIGNAL_RATE_FINAL_RANGE, signalLimit);
-
- if( status ){
- printf("VL53L0X_SetLimitCheckValue failed\n");
- }
-
- status = VL53L0X_SetLimitCheckValue(&Dev, VL53L0X_CHECKENABLE_SIGMA_FINAL_RANGE, sigmaLimit);
- if( status ){
- printf("VL53L0X_SetLimitCheckValue failed\n");
- }
-
- status = VL53L0X_SetMeasurementTimingBudgetMicroSeconds(&Dev, timingBudget);
- if( status ){
- printf("VL53L0X_SetMeasurementTimingBudgetMicroSeconds failed\n");
- }
-
- status = VL53L0X_SetVcselPulsePeriod(&Dev, VL53L0X_VCSEL_PERIOD_PRE_RANGE, preRangeVcselPeriod);
- if( status ){
- printf("VL53L0X_SetVcselPulsePeriod failed\n");
- }
-
- status = VL53L0X_SetVcselPulsePeriod(&Dev, VL53L0X_VCSEL_PERIOD_FINAL_RANGE, finalRangeVcselPeriod);
- if( status ){
- printf("VL53L0X_SetVcselPulsePeriod failed\n");
- }
-
- Dev.LeakyFirst=1;
- }
-}
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_tof.h b/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_tof.h
deleted file mode 100644
index a1caf711a..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_tof.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/**
- ******************************************************************************
- * @file vl53l0x_tof.h
- * @author MCD Application Team
- * @brief STM32L475E-IOT01 board support package
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2017(-2021) STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-/* Define to prevent recursive inclusion -------------------------------------*/
-#ifndef __VL53L0X_TOF_H
-#define __VL53L0X_TOF_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-/* Exported types ------------------------------------------------------------*/
-/**
- * @struct VL53L0X_Dev_t
- * @brief Generic PAL device type that does link between API and platform abstraction layer
- *
- */
-typedef struct {
- VL53L0X_DevData_t Data; /*!< embed ST Ewok Dev data as "Data"*/
-
- /*!< user specific field */
-
- I2C_HandleTypeDef *I2cHandle;
- uint8_t I2cDevAddr;
-
- char DevLetter;
-
- int Id;
- int Present;
- int Enabled;
- int Ready;
-
- uint8_t comms_type;
- uint16_t comms_speed_khz;
-
- int LeakyRange;
- int LeakyFirst;
- uint8_t RangeStatus;
- uint8_t PreviousRangeStatus;
- FixPoint1616_t SignalRateRtnMegaCps;
- uint16_t EffectiveSpadRtnCount;
-
-} VL53L0X_Dev_t;
-
-
-/**
- * @brief Declare the device Handle as a pointer of the structure @a VL53L0X_Dev_t.
- *
- */
-typedef VL53L0X_Dev_t* VL53L0X_DEV;
-
-/* Exported constants --------------------------------------------------------*/
-/* Exported macros -----------------------------------------------------------*/
-/**
- * @def PALDevDataGet
- * @brief Get ST private structure @a VL53L0X_DevData_t data access
- *
- * @param Dev Device Handle
- * @param field ST structure field name
- * It maybe used and as real data "ref" not just as "get" for sub-structure item
- * like PALDevDataGet(FilterData.field)[i] or PALDevDataGet(FilterData.MeasurementIndex)++
- */
-#define PALDevDataGet(Dev, field) (Dev->Data.field)
-
-/**
- * @def PALDevDataSet(Dev, field, data)
- * @brief Set ST private structure @a VL53L0X_DevData_t data field
- * @param Dev Device Handle
- * @param field ST structure field name
- * @param data Data to be set
- */
-#define PALDevDataSet(Dev, field, data) (Dev->Data.field)=(data)
-
-#define VL53L0X_COPYSTRING(str, ...) strcpy(str, ##__VA_ARGS__)
-/* Private macros ------------------------------------------------------------*/
-/* Exported functions --------------------------------------------------------*/
-
-/**
- * Lock comms interface to serialize all commands to a shared I2C interface for a specific device
- * @param Dev Device Handle
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_Error VL53L0X_LockSequenceAccess(VL53L0X_DEV Dev);
-
-/**
- * Unlock comms interface to serialize all commands to a shared I2C interface for a specific device
- * @param Dev Device Handle
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_Error VL53L0X_UnlockSequenceAccess(VL53L0X_DEV Dev);
-
-
-/**
- * Writes the supplied byte buffer to the device
- * @param Dev Device Handle
- * @param index The register index
- * @param pdata Pointer to uint8_t buffer containing the data to be written
- * @param count Number of bytes in the supplied byte buffer
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_Error VL53L0X_WriteMulti(VL53L0X_DEV Dev, uint8_t index, uint8_t *pdata, uint32_t count);
-
-/**
- * Reads the requested number of bytes from the device
- * @param Dev Device Handle
- * @param index The register index
- * @param pdata Pointer to the uint8_t buffer to store read data
- * @param count Number of uint8_t's to read
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_Error VL53L0X_ReadMulti(VL53L0X_DEV Dev, uint8_t index, uint8_t *pdata, uint32_t count);
-
-/**
- * Write single byte register
- * @param Dev Device Handle
- * @param index The register index
- * @param data 8 bit register data
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_Error VL53L0X_WrByte(VL53L0X_DEV Dev, uint8_t index, uint8_t data);
-
-/**
- * Write word register
- * @param Dev Device Handle
- * @param index The register index
- * @param data 16 bit register data
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_Error VL53L0X_WrWord(VL53L0X_DEV Dev, uint8_t index, uint16_t data);
-
-/**
- * Write double word (4 byte) register
- * @param Dev Device Handle
- * @param index The register index
- * @param data 32 bit register data
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_Error VL53L0X_WrDWord(VL53L0X_DEV Dev, uint8_t index, uint32_t data);
-
-/**
- * Read single byte register
- * @param Dev Device Handle
- * @param index The register index
- * @param data pointer to 8 bit data
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_Error VL53L0X_RdByte(VL53L0X_DEV Dev, uint8_t index, uint8_t *data);
-
-/**
- * Read word (2byte) register
- * @param Dev Device Handle
- * @param index The register index
- * @param data pointer to 16 bit data
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_Error VL53L0X_RdWord(VL53L0X_DEV Dev, uint8_t index, uint16_t *data);
-
-/**
- * Read dword (4byte) register
- * @param Dev Device Handle
- * @param index The register index
- * @param data pointer to 32 bit data
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_Error VL53L0X_RdDWord(VL53L0X_DEV Dev, uint8_t index, uint32_t *data);
-
-/**
- * Threat safe Update (read/modify/write) single byte register
- *
- * Final_reg = (Initial_reg & and_data) |or_data
- *
- * @param Dev Device Handle
- * @param index The register index
- * @param AndData 8 bit and data
- * @param OrData 8 bit or data
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_Error VL53L0X_UpdateByte(VL53L0X_DEV Dev, uint8_t index, uint8_t AndData, uint8_t OrData);
-
-/** @} end of VL53L0X_registerAccess_group */
-
-
-/**
- * @brief execute delay in all polling API call
- *
- * A typical multi-thread or RTOs implementation is to sleep the task for some 5ms (with 100Hz max rate faster polling is not needed)
- * if nothing specific is need you can define it as an empty/void macro
- * @code
- * #define VL53L0X_PollingDelay(...) (void)0
- * @endcode
- * @param Dev Device Handle
- * @return VL53L0X_ERROR_NONE Success
- * @return "Other error code" See ::VL53L0X_Error
- */
-VL53L0X_Error VL53L0X_PollingDelay(VL53L0X_DEV Dev); /* usually best implemented as a real function */
-
-void SetupSingleShot(VL53L0X_Dev_t Dev);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __VL53L0X_TOF_H */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_tuning.h b/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_tuning.h
deleted file mode 100644
index 3bee119ac..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_tuning.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/**
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2019-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-#ifndef _VL53L0X_TUNING_H_
-#define _VL53L0X_TUNING_H_
-
-#include "vl53l0x_def.h"
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-uint8_t DefaultTuningSettings[] = {
-
- /* update 02/11/2015_v36 */
- 0x01, 0xFF, 0x01,
- 0x01, 0x00, 0x00,
-
- 0x01, 0xFF, 0x00,
- 0x01, 0x09, 0x00,
- 0x01, 0x10, 0x00,
- 0x01, 0x11, 0x00,
-
- 0x01, 0x24, 0x01,
- 0x01, 0x25, 0xff,
- 0x01, 0x75, 0x00,
-
- 0x01, 0xFF, 0x01,
- 0x01, 0x4e, 0x2c,
- 0x01, 0x48, 0x00,
- 0x01, 0x30, 0x20,
-
- 0x01, 0xFF, 0x00,
- 0x01, 0x30, 0x09, /* mja changed from 0x64. */
- 0x01, 0x54, 0x00,
- 0x01, 0x31, 0x04,
- 0x01, 0x32, 0x03,
- 0x01, 0x40, 0x83,
- 0x01, 0x46, 0x25,
- 0x01, 0x60, 0x00,
- 0x01, 0x27, 0x00,
- 0x01, 0x50, 0x06,
- 0x01, 0x51, 0x00,
- 0x01, 0x52, 0x96,
- 0x01, 0x56, 0x08,
- 0x01, 0x57, 0x30,
- 0x01, 0x61, 0x00,
- 0x01, 0x62, 0x00,
- 0x01, 0x64, 0x00,
- 0x01, 0x65, 0x00,
- 0x01, 0x66, 0xa0,
-
- 0x01, 0xFF, 0x01,
- 0x01, 0x22, 0x32,
- 0x01, 0x47, 0x14,
- 0x01, 0x49, 0xff,
- 0x01, 0x4a, 0x00,
-
- 0x01, 0xFF, 0x00,
- 0x01, 0x7a, 0x0a,
- 0x01, 0x7b, 0x00,
- 0x01, 0x78, 0x21,
-
- 0x01, 0xFF, 0x01,
- 0x01, 0x23, 0x34,
- 0x01, 0x42, 0x00,
- 0x01, 0x44, 0xff,
- 0x01, 0x45, 0x26,
- 0x01, 0x46, 0x05,
- 0x01, 0x40, 0x40,
- 0x01, 0x0E, 0x06,
- 0x01, 0x20, 0x1a,
- 0x01, 0x43, 0x40,
-
- 0x01, 0xFF, 0x00,
- 0x01, 0x34, 0x03,
- 0x01, 0x35, 0x44,
-
- 0x01, 0xFF, 0x01,
- 0x01, 0x31, 0x04,
- 0x01, 0x4b, 0x09,
- 0x01, 0x4c, 0x05,
- 0x01, 0x4d, 0x04,
-
-
- 0x01, 0xFF, 0x00,
- 0x01, 0x44, 0x00,
- 0x01, 0x45, 0x20,
- 0x01, 0x47, 0x08,
- 0x01, 0x48, 0x28,
- 0x01, 0x67, 0x00,
- 0x01, 0x70, 0x04,
- 0x01, 0x71, 0x01,
- 0x01, 0x72, 0xfe,
- 0x01, 0x76, 0x00,
- 0x01, 0x77, 0x00,
-
- 0x01, 0xFF, 0x01,
- 0x01, 0x0d, 0x01,
-
- 0x01, 0xFF, 0x00,
- 0x01, 0x80, 0x01,
- 0x01, 0x01, 0xF8,
-
- 0x01, 0xFF, 0x01,
- 0x01, 0x8e, 0x01,
- 0x01, 0x00, 0x01,
- 0x01, 0xFF, 0x00,
- 0x01, 0x80, 0x00,
-
- 0x00, 0x00, 0x00
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _VL53L0X_TUNING_H_ */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_types.h b/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_types.h
deleted file mode 100644
index e8e054837..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/Src/vl53l0x/vl53l0x_types.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- ******************************************************************************
- * @file vl53l0x_types.h
- * @brief VL53L0X types definition
- ******************************************************************************
- * @attention
- *
- * Copyright (c) 2017(-2021) STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- */
-
-#ifndef VL53L0X_TYPES_H_
-#define VL53L0X_TYPES_H_
-
-/** @defgroup porting_type Basic type definition
- * @ingroup VL53L0X_platform_group
- *
- * @brief file vl53l0x_types.h files hold basic type definition that may requires porting
- *
- * contains type that must be defined for the platform\n
- * when target platform and compiler provide stdint.h and stddef.h it is enough to include it.\n
- * If stdint.h is not available review and adapt all signed and unsigned 8/16/32 bits basic types. \n
- * If stddef.h is not available review and adapt NULL definition .
- */
-#include <stdint.h>
-#include <stddef.h>
-
-#ifndef NULL
-#error "Error NULL definition should be done. Please add required include "
-#endif
-
-
-#if ! defined(STDINT_H) && !defined(_GCC_STDINT_H) &&!defined(__STDINT_DECLS) && !defined(_GCC_WRAP_STDINT_H) && !defined(_STDINT) && !defined(_STDINT_H)
-
- #pragma message("Please review type definition of STDINT define for your platform and add to list above ")
-
- /*
- * target platform do not provide stdint or use a different #define than above
- * to avoid seeing the message below adapt the #define list above or implement
- * all type and delete these pragma
- */
-
-/** \ingroup VL53L0X_portingType_group
- * @{
- */
-
-
-typedef unsigned long long uint64_t;
-
-
-/** @brief Typedef defining 32 bit unsigned int type.\n
- * The developer should modify this to suit the platform being deployed.
- */
-typedef unsigned int uint32_t;
-
-/** @brief Typedef defining 32 bit int type.\n
- * The developer should modify this to suit the platform being deployed.
- */
-typedef int int32_t;
-
-/** @brief Typedef defining 16 bit unsigned short type.\n
- * The developer should modify this to suit the platform being deployed.
- */
-typedef unsigned short uint16_t;
-
-/** @brief Typedef defining 16 bit short type.\n
- * The developer should modify this to suit the platform being deployed.
- */
-typedef short int16_t;
-
-/** @brief Typedef defining 8 bit unsigned char type.\n
- * The developer should modify this to suit the platform being deployed.
- */
-typedef unsigned char uint8_t;
-
-/** @brief Typedef defining 8 bit char type.\n
- * The developer should modify this to suit the platform being deployed.
- */
-typedef signed char int8_t;
-
-/** @} */
-#endif /* _STDINT_H */
-
-
-/** use where fractional values are expected
- *
- * Given a floating point value f it's .16 bit point is (int)(f*(1<<16))*/
-typedef uint32_t FixPoint1616_t;
-
-#endif /* VL53L0X_TYPES_H_ */
diff --git a/Projects/STM32WB5MM-DK/Examples/BSP/readme.txt b/Projects/STM32WB5MM-DK/Examples/BSP/readme.txt
deleted file mode 100644
index f16aff2c4..000000000
--- a/Projects/STM32WB5MM-DK/Examples/BSP/readme.txt
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- @page BSP Description of the BSP example
-
- @verbatim
- ******************************************************************************
- * @file BSP/readme.txt
- * @author MCD Application Team
- * @brief Description of the BSP example.
- ******************************************************************************
- *
- * Copyright (c) 2020-2021 STMicroelectronics.
- * All rights reserved.
- *
- * This software is licensed under terms that can be found in the LICENSE file
- * in the root directory of this software component.
- * If no LICENSE file comes with this software, it is provided AS-IS.
- *
- ******************************************************************************
- @endverbatim
-
-@par Example Description
-
-How to use the different BSP drivers of external devices mounted on : STM32WB5MM-DK board.
-
-At the beginning of the main program the HAL_Init() function is called to reset
-all the peripherals, initialize the Flash interface and the systick.
-Then the SystemClock_Config() function is used to configure the system clock
-(SYSCLK) to run at 64 MHz.
-
-This example shows how to use the different functionalities of components
-available on the board by switching between all tests using User Button1 push-button.
-
- ** Push the User B1 push-button to start first Test.
-
-### LCD ###
-This example shows how to use the different LCD features to display string
-with different fonts, to display different shapes and to draw a bitmap.
-
-### TEMPERATURE ###
-This example shows how to use the sensors to get temperature values. Both,
-STTS22H and LPS22HB sensors are used.
-
-### GYROSCOPE ###
-This example shows how to use the ISM330DHCX sensor to get gyroscope values.
-
-### ACCELERO ###
-This example shows how to use the ISM330DHCX sensor to get accelerometer values.
-
-### PROXIMITY ###
-This example shows how to use the VL53L0X sensor to get distance values.
-
-### QSPI ###
-This example provides of how to write, read and buffers compare for external
-flash memory using QSPI communication.
-
-### AUDIO RECORD ###
-This document provides a description of the microphone streaming application based
-on STM32WB5MM-DK board. It allows acquisition of a digital MEMS microphones,
-PDM to PCM decimation and streaming towards a host PC via a dedicated USB Audio Input driver.
-
-@note Care must be taken when using HAL_Delay(), this function provides accurate delay (in milliseconds)
- based on variable incremented in SysTick ISR. This implies that if HAL_Delay() is called from
- a peripheral ISR process, then the SysTick interrupt must have higher priority (numerically lower)
- than the peripheral interrupt. Otherwise the caller ISR process will be blocked.
- To change the SysTick interrupt priority you have to use HAL_NVIC_SetPriority() function.
-
-@note The application need to ensure that the SysTick time base is always set to 1 millisecond
- to have correct HAL operation.
-
-@par Keywords
-
-BSP, DMA, Audio record, Microphone, LCD, QSPI, QUADSPI, Humidity, Display, Button, Temperature, Sensor,
-Accelerometer, Distance, STTS22H, ISM330DHCX, VL53L0X, PDM, PCM, USB.
-
-@par Directory contents
-
- - BSP/Src/main.c Main program
- - BSP/Src/system_stm32wbxx.c STM32WBxx system clock configuration file
- - BSP/Src/stm32wbxx_it.c Interrupt handlers
- - BSP/Src/sensors.c Tests of stts22h, iis2mdc, ism330dhcx and lps22hh sensors
- - BSP/Src/lcd.c LCD drawing features
- - BSP/Src/record.c Record and Play audio
- - BSP/Src/qspi.c QUADSPI Read/Write features
- - BSP/Src/proximity.c Tests of vl53l0x sensor
- - BSP/Inc/main.h Main program header file
- - BSP/Inc/stm32wbxx_hal_conf.h HAL Configuration file
- - BSP/Inc/stm32wbxx_it.h Interrupt handlers header file
- - BSP/Inc/stm32wb5mm_dk_conf.h STM32WB5MM-DK board configuration file
-
-@par Hardware and Software environment
-
- - This example runs on STM32WB5MMxx devices.
-
- - This example has been tested with STMicroelectronics STM32WB5MM-DK
- boards.
-
-
-@par How to use it ?
-
-In order to make the program work, you must do the following :
- - Open your preferred toolchain
- - Rebuild all files and load your image into target memory
- - Run the example
- - In order to stream audio via USB, connect STM32WB5MM-DK USB connector to a host PC
-
- * <h3><center>&copy; COPYRIGHT STMicroelectronics</center></h3>
- */
diff --git a/README.md b/README.md
index 37dfaae84..79bfef8ab 100644
--- a/README.md
+++ b/README.md
@@ -13,6 +13,13 @@
The **STM32CubeWB MCU Package** projects are directly running on the STM32WB series boards. You can find in each Projects/*Board name* directories a set of software projects (Applications/Demonstration/Examples).
+## Some middleware libraries are unavailable in this repository
+
+In this repository, the middleware libraries listed below **along with** the projects (demos, applications, and examples) using them, are **not available** as they (the middleware libraries) are subject to some restrictive license terms requiring the user's approval via a "click thu" procedure.
+* `./Middlewares/ST/STM32_Audio`
+
+If needed, they can be found inside the full firmware package available on our website `st.com` and downloadable from [here](https://www.st.com/content/st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32cube-mcu-mpu-packages/stm32cubewb.html#get-software). You will be prompted to login or to register in case you have no account.
+
## Release note
Details about the content of this release are available in the release note [here](https://htmlpreview.github.io/?https://github.com/STMicroelectronics/STM32CubeWB/blob/master/Release_Notes.html).
@@ -27,6 +34,4 @@ Details about the content of this release are available in the release note [her
## Troubleshooting
-**Caution** : The issues and the pull-requests are **strictly limited** to submit problems or suggestions related to the software delivered in this repository.
-
-**For any other question** related to the product, the hardware performance or characteristics, the tools, the environment, you can submit it to the **ST Community** on the STM32 MCUs related [page](https://community.st.com/s/group/0F90X000000AXsASAW/stm32-mcus).
+Please refer to the [CONTRIBUTING.md](CONTRIBUTING.md) guide.