init
No files matched your search
@@ -0,0 +1,27 @@
|
||||
Copyright 2014-2021 STMicroelectronics.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation and/or
|
||||
other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,6 @@
|
||||
This software component is provided to you as part of a software package and
|
||||
applicable license terms are in the Package_license file. If you received this
|
||||
software component outside of a package or without applicable license terms,
|
||||
the terms of the BSD-3-Clause license shall apply.
|
||||
You may obtain a copy of the BSD-3-Clause at:
|
||||
https://opensource.org/licenses/BSD-3-Clause
|
||||
@@ -0,0 +1,252 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
<title>Release Notes for BSP Common Components Drivers</title>
|
||||
<style type="text/css">
|
||||
code{white-space: pre-wrap;}
|
||||
span.smallcaps{font-variant: small-caps;}
|
||||
span.underline{text-decoration: underline;}
|
||||
div.column{display: inline-block; vertical-align: top; width: 50%;}
|
||||
</style>
|
||||
<link rel="stylesheet" href="_htmresc/mini-st.css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<link rel="icon" type="image/x-icon" href="_htmresc/favicon.png" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-lg-4">
|
||||
<center>
|
||||
<h1 id="release-notes-for-bsp-common-components-drivers"><small>Release Notes for</small> <mark>BSP Common Components Drivers</mark></h1>
|
||||
<p>Copyright © 2014-2023 STMicroelectronics<br />
|
||||
</p>
|
||||
<a href="https://www.st.com" class="logo"><img src="_htmresc/st_logo.png" alt="ST logo" /></a>
|
||||
</center>
|
||||
<h1 id="purpose">Purpose</h1>
|
||||
<p>This directory contains the BSP Common components drivers.</p>
|
||||
</div>
|
||||
<div class="col-sm-12 col-lg-8">
|
||||
<h1 id="update-history">Update History</h1>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section20" checked aria-hidden="true"> <label for="collapse-section20" aria-hidden="true">V7.3.0 / 28-September-2023</label>
|
||||
<div>
|
||||
<h2 id="main-changes">Main Changes</h2>
|
||||
<h3 id="component-release">Component release</h3>
|
||||
<ul>
|
||||
<li>Add Frequency, Exposure and Gain configuration function pointers in camera.h</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section19" aria-hidden="true"> <label for="collapse-section19" aria-hidden="true">V7.2.1 / 16-November-2021</label>
|
||||
<div>
|
||||
<h2 id="main-changes-1">Main Changes</h2>
|
||||
<h3 id="component-release-1">Component release</h3>
|
||||
<ul>
|
||||
<li>Update licensing</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section18" aria-hidden="true"> <label for="collapse-section18" aria-hidden="true">V7.2.0 / 11-October-2021</label>
|
||||
<div>
|
||||
<h2 id="main-changes-2">Main Changes</h2>
|
||||
<h3 id="component-release-2">Component release</h3>
|
||||
<ul>
|
||||
<li>Add hybrid_sensor.h to support hybrid (env and motion) sensors</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section17" aria-hidden="true"> <label for="collapse-section17" aria-hidden="true">V7.1.0 / 18-Juin-2021</label>
|
||||
<div>
|
||||
<h2 id="main-changes-3">Main Changes</h2>
|
||||
<h3 id="component-release-3">Component release</h3>
|
||||
<ul>
|
||||
<li>Add ranging_sensor.h to support ranging sensors</li>
|
||||
<li>Add light_sensor.h to support ambient light sensors</li>
|
||||
<li>Rename UTILS_LCD_Drv_t structure into LCD_UTILS_Drv_t</li>
|
||||
<li>Code spelling and formatting</li>
|
||||
</ul>
|
||||
<h2 id="backward-compatibility">Backward Compatibility</h2>
|
||||
<ul>
|
||||
<li>This release breaks compatibility with previous versions.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section16" aria-hidden="true"> <label for="collapse-section16" aria-hidden="true">V7.0.0 / 25-February-2020</label>
|
||||
<div>
|
||||
<h2 id="main-changes-4">Main Changes</h2>
|
||||
<h3 id="component-release-4">Component release</h3>
|
||||
<ul>
|
||||
<li>Rename GUI_Drv_t structure into UTILS_LCD_Drv_t</li>
|
||||
</ul>
|
||||
<h2 id="backward-compatibility-1">Backward Compatibility</h2>
|
||||
<ul>
|
||||
<li>This release breaks compatibility with previous versions.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section15" aria-hidden="true"> <label for="collapse-section15" aria-hidden="true">V6.0.1 / 15-October-2019</label>
|
||||
<div>
|
||||
<h2 id="main-changes-5">Main Changes</h2>
|
||||
<h3 id="component-release-5">Component release</h3>
|
||||
<ul>
|
||||
<li>Update st_logo.png inclusion path in Release notes.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section14" aria-hidden="true"> <label for="collapse-section14" aria-hidden="true">V6.0.0 / 12-April-2019</label>
|
||||
<div>
|
||||
<h2 id="main-changes-6">Main Changes</h2>
|
||||
<h3 id="component-release-6">Component release</h3>
|
||||
<p>Official release of BSP Common components drivers in line with STM32Cube BSP drivers development guidelines (UM2298).</p>
|
||||
<h2 id="backward-compatibility-2">Backward Compatibility</h2>
|
||||
<p>This release breaks compatibility with previous versions.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section13" aria-hidden="true"> <label for="collapse-section13" aria-hidden="true">V5.1.1 / 31-August-2018</label>
|
||||
<div>
|
||||
<h2 id="main-changes-7">Main Changes</h2>
|
||||
<p>Reformat the BSD 3-Clause license declaration in the files header (replace license terms by a web reference to OSI website where those terms lie)<br />
|
||||
Correct sensor names in headers files hsensor.h and psensor.h</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section12" aria-hidden="true"> <label for="collapse-section12" aria-hidden="true">V5.1.0 / 21-November-2017</label>
|
||||
<div>
|
||||
<h2 id="main-changes-8">Main Changes</h2>
|
||||
<p>Add dpredriver.h: support of DP redriver class<br />
|
||||
Add pwrmon.h: support of power monitor class<br />
|
||||
Add usbtypecswitch.h: support of USB type C switch class</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section11" aria-hidden="true"> <label for="collapse-section11" aria-hidden="true">V5.0.0 / 01-March-2017</label>
|
||||
<div>
|
||||
<h2 id="main-changes-9">Main Changes</h2>
|
||||
<p>Add hsensor.h: support of humidity class<br />
|
||||
Add psensor.h: support of pressure class<br />
|
||||
Update tsensor.h: Temperature can be negative<br />
|
||||
Update accelero.h: LowPower API can enable or disable the low power mode<br />
|
||||
Update magneto.h: LowPower API can enable or disable the low power mode</p>
|
||||
<h2 id="backward-compatibility-3">Backward Compatibility</h2>
|
||||
<p>This release breaks compatibility with previous versions.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section10" aria-hidden="true"> <label for="collapse-section10" aria-hidden="true">V4.0.1 / 21-July-2015</label>
|
||||
<div>
|
||||
<h2 id="main-changes-10">Main Changes</h2>
|
||||
<p>tsensor.h: Fix compilation issue on <em>TSENSOR_InitTypeDef</em></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section9" aria-hidden="true"> <label for="collapse-section9" aria-hidden="true">V4.0.0 / 22-June-2015</label>
|
||||
<div>
|
||||
<h2 id="main-changes-11">Main Changes</h2>
|
||||
<p>accelero.h: add <em>DeInit</em> field in <em>ACCELERO_DrvTypeDef</em> structure<br />
|
||||
audio.h: add <em>DeInit</em> field in <em>AUDIO_DrvTypeDef</em> structure<br />
|
||||
idd.h:</p>
|
||||
<ul>
|
||||
<li>add <em>Shunt0StabDelay</em>, <em>Shunt1StabDelay</em>, <em>Shunt2StabDelay</em>, <em>Shunt3StabDelay</em>, <em>Shunt4StabDelay</em> and <em>ShuntNbOnBoard</em> fields in <em>IDD_ConfigTypeDef</em> structure<br />
|
||||
</li>
|
||||
<li>rename <em>ShuntNumber</em> field to <em>ShuntNbUsed</em> in <em>IDD_ConfigTypeDef</em> structure</li>
|
||||
</ul>
|
||||
<p>magneto.h: add <em>DeInit</em> field in <em>MAGNETO_DrvTypeDef</em> structure</p>
|
||||
<h2 id="backward-compatibility-4">Backward Compatibility</h2>
|
||||
<p>This release breaks compatibility with previous versions.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section8" aria-hidden="true"> <label for="collapse-section8" aria-hidden="true">V3.0.0 / 28-April-2015</label>
|
||||
<div>
|
||||
<h2 id="main-changes-12">Main Changes</h2>
|
||||
<p>accelero.h: add <em>LowPower</em> field in <em>ACCELERO_DrvTypeDef</em> structure<br />
|
||||
magneto.h: add <em>LowPower</em> field in <em>MAGNETO_DrvTypeDef</em> structure<br />
|
||||
gyro.h: add <em>DeInit</em> and <em>LowPower</em> fields in <em>GYRO_DrvTypeDef</em> structure<br />
|
||||
camera.h: add CAMERA_COLOR_EFFECT_NONE define<br />
|
||||
idd.h:</p>
|
||||
<ul>
|
||||
<li>add <em>MeasureNb</em>, <em>DeltaDelayUnit</em> and <em>DeltaDelayValue</em> fields in <em>IDD_ConfigTypeDef</em> structure<br />
|
||||
</li>
|
||||
<li>rename <em>PreDelay</em> field to <em>PreDelayUnit</em> in <em>IDD_ConfigTypeDef</em> structure</li>
|
||||
</ul>
|
||||
<h2 id="backward-compatibility-5">Backward Compatibility</h2>
|
||||
<p>This release breaks compatibility with previous versions.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section7" aria-hidden="true"> <label for="collapse-section7" aria-hidden="true">V2.2.0 / 09-February-2015</label>
|
||||
<div>
|
||||
<h2 id="main-changes-13">Main Changes</h2>
|
||||
<p>Magnetometer driver function prototypes added (magneto.h file)<br />
|
||||
Update “idd.h” file to provide DeInit() and WakeUp() services in IDD current measurement driver</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section6" aria-hidden="true"> <label for="collapse-section6" aria-hidden="true">V2.1.0 / 06-February-2015</label>
|
||||
<div>
|
||||
<h2 id="main-changes-14">Main Changes</h2>
|
||||
<p>IDD current measurement driver function prototypes added (idd.h file)<br />
|
||||
io.h: add new typedef enum IO_PinState with IO_PIN_RESET and IO_PIN_SET values</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section5" aria-hidden="true"> <label for="collapse-section5" aria-hidden="true">V2.0.0 / 15-December-2014</label>
|
||||
<div>
|
||||
<h2 id="main-changes-15">Main Changes</h2>
|
||||
<p>Update “io.h” file to support MFX (Multi Function eXpander) device available on some STM32 boards</p>
|
||||
<ul>
|
||||
<li>add new entries for <em>IO_ModeTypedef</em> enumeration structure</li>
|
||||
<li>update the <em>IO_DrvTypeDef</em> structure</li>
|
||||
<li>Update all return values and function parameters to uint32_t</li>
|
||||
<li>Add a return value for <em>Config</em> field</li>
|
||||
</ul>
|
||||
<h2 id="backward-compatibility-6">Backward Compatibility</h2>
|
||||
<p>This release breaks compatibility with previous versions.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section4" aria-hidden="true"> <label for="collapse-section4" aria-hidden="true">V1.2.1 / 02-December-2014</label>
|
||||
<div>
|
||||
<h2 id="main-changes-16">Main Changes</h2>
|
||||
<p>gyro.h: change “__GIRO_H” by “__GYRO_H” to fix compilation issue under Mac OS</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section3" aria-hidden="true"> <label for="collapse-section3" aria-hidden="true">V1.2.0 / 18-June-2014</label>
|
||||
<div>
|
||||
<h2 id="main-changes-17">Main Changes</h2>
|
||||
<p>EPD (E Paper Display) driver function prototype added (epd.h file)</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section2" aria-hidden="true"> <label for="collapse-section2" aria-hidden="true">V1.1.0 / 21-March-2014</label>
|
||||
<div>
|
||||
<h2 id="main-changes-18">Main Changes</h2>
|
||||
<p>Temperature Sensor driver function prototype added</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section1" aria-hidden="true"> <label for="collapse-section1" aria-hidden="true">V1.0.0 / 18-February-2014</label>
|
||||
<div>
|
||||
<h2 id="main-changes-19">Main Changes</h2>
|
||||
<p>First official release with Accelerometer, Audio, Camera, Gyroscope, IO, LCD and Touch Screen drivers function prototypes</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="sticky">
|
||||
For complete documentation on <mark>STM32 Microcontrollers</mark> , visit: <a href="http://www.st.com/STM32">http://www.st.com/STM32</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,337 @@
|
||||
---
|
||||
pagetitle: Release Notes for BSP Common Components Drivers
|
||||
lang: en
|
||||
header-includes: <link rel="icon" type="image/x-icon" href="_htmresc/favicon.png" />
|
||||
---
|
||||
|
||||
::: {.row}
|
||||
::: {.col-sm-12 .col-lg-4}
|
||||
|
||||
<center>
|
||||
# <small>Release Notes for</small> <mark>BSP Common Components Drivers</mark>
|
||||
Copyright © 2014-2023 STMicroelectronics\
|
||||
|
||||
[](https://www.st.com){.logo}
|
||||
</center>
|
||||
|
||||
# Purpose
|
||||
|
||||
This directory contains the BSP Common components drivers.
|
||||
|
||||
:::
|
||||
|
||||
::: {.col-sm-12 .col-lg-8}
|
||||
# Update History
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section20" checked aria-hidden="true">
|
||||
<label for="collapse-section20" aria-hidden="true">V7.3.0 / 28-September-2023</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
### Component release
|
||||
|
||||
- Add Frequency, Exposure and Gain configuration function pointers in camera.h
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section19" aria-hidden="true">
|
||||
<label for="collapse-section19" aria-hidden="true">V7.2.1 / 16-November-2021</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
### Component release
|
||||
|
||||
- Update licensing
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section18" aria-hidden="true">
|
||||
<label for="collapse-section18" aria-hidden="true">V7.2.0 / 11-October-2021</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
### Component release
|
||||
|
||||
- Add hybrid_sensor.h to support hybrid (env and motion) sensors
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section17" aria-hidden="true">
|
||||
<label for="collapse-section17" aria-hidden="true">V7.1.0 / 18-Juin-2021</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
### Component release
|
||||
|
||||
- Add ranging_sensor.h to support ranging sensors
|
||||
- Add light_sensor.h to support ambient light sensors
|
||||
- Rename UTILS_LCD_Drv_t structure into LCD_UTILS_Drv_t
|
||||
- Code spelling and formatting
|
||||
|
||||
## Backward Compatibility
|
||||
|
||||
- This release breaks compatibility with previous versions.
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section16" aria-hidden="true">
|
||||
<label for="collapse-section16" aria-hidden="true">V7.0.0 / 25-February-2020</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
### Component release
|
||||
|
||||
- Rename GUI_Drv_t structure into UTILS_LCD_Drv_t
|
||||
|
||||
## Backward Compatibility
|
||||
|
||||
- This release breaks compatibility with previous versions.
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section15" aria-hidden="true">
|
||||
<label for="collapse-section15" aria-hidden="true">V6.0.1 / 15-October-2019</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
### Component release
|
||||
|
||||
- Update st_logo.png inclusion path in Release notes.
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section14" aria-hidden="true">
|
||||
<label for="collapse-section14" aria-hidden="true">V6.0.0 / 12-April-2019</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
### Component release
|
||||
|
||||
Official release of BSP Common components drivers in line with STM32Cube BSP drivers development guidelines (UM2298).
|
||||
|
||||
## Backward Compatibility
|
||||
|
||||
This release breaks compatibility with previous versions.
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section13" aria-hidden="true">
|
||||
<label for="collapse-section13" aria-hidden="true">V5.1.1 / 31-August-2018</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
Reformat the BSD 3-Clause license declaration in the files header (replace license terms by a web reference to OSI website where those terms lie)
|
||||
Correct sensor names in headers files hsensor.h and psensor.h
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section12" aria-hidden="true">
|
||||
<label for="collapse-section12" aria-hidden="true">V5.1.0 / 21-November-2017</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
Add dpredriver.h: support of DP redriver class
|
||||
Add pwrmon.h: support of power monitor class
|
||||
Add usbtypecswitch.h: support of USB type C switch class
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section11" aria-hidden="true">
|
||||
<label for="collapse-section11" aria-hidden="true">V5.0.0 / 01-March-2017</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
Add hsensor.h: support of humidity class
|
||||
Add psensor.h: support of pressure class
|
||||
Update tsensor.h: Temperature can be negative
|
||||
Update accelero.h: LowPower API can enable or disable the low power mode
|
||||
Update magneto.h: LowPower API can enable or disable the low power mode
|
||||
|
||||
## Backward Compatibility
|
||||
|
||||
This release breaks compatibility with previous versions.
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section10" aria-hidden="true">
|
||||
<label for="collapse-section10" aria-hidden="true">V4.0.1 / 21-July-2015</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
tsensor.h: Fix compilation issue on *TSENSOR_InitTypeDef*
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section9" aria-hidden="true">
|
||||
<label for="collapse-section9" aria-hidden="true">V4.0.0 / 22-June-2015</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
accelero.h: add *DeInit* field in *ACCELERO_DrvTypeDef* structure
|
||||
audio.h: add *DeInit* field in *AUDIO_DrvTypeDef* structure
|
||||
idd.h:
|
||||
|
||||
- add *Shunt0StabDelay*, *Shunt1StabDelay*, *Shunt2StabDelay*, *Shunt3StabDelay*, *Shunt4StabDelay* and *ShuntNbOnBoard* fields in *IDD_ConfigTypeDef* structure
|
||||
- rename *ShuntNumber* field to *ShuntNbUsed* in *IDD_ConfigTypeDef* structure
|
||||
|
||||
magneto.h: add *DeInit* field in *MAGNETO_DrvTypeDef* structure
|
||||
|
||||
## Backward Compatibility
|
||||
|
||||
This release breaks compatibility with previous versions.
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section8" aria-hidden="true">
|
||||
<label for="collapse-section8" aria-hidden="true">V3.0.0 / 28-April-2015</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
accelero.h: add *LowPower* field in *ACCELERO_DrvTypeDef* structure
|
||||
magneto.h: add *LowPower* field in *MAGNETO_DrvTypeDef* structure
|
||||
gyro.h: add *DeInit* and *LowPower* fields in *GYRO_DrvTypeDef* structure
|
||||
camera.h: add CAMERA_COLOR_EFFECT_NONE define
|
||||
idd.h:
|
||||
|
||||
- add *MeasureNb*, *DeltaDelayUnit* and *DeltaDelayValue* fields in *IDD_ConfigTypeDef* structure
|
||||
- rename *PreDelay* field to *PreDelayUnit* in *IDD_ConfigTypeDef* structure
|
||||
|
||||
## Backward Compatibility
|
||||
|
||||
This release breaks compatibility with previous versions.
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section7" aria-hidden="true">
|
||||
<label for="collapse-section7" aria-hidden="true">V2.2.0 / 09-February-2015</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
Magnetometer driver function prototypes added (magneto.h file)
|
||||
Update "idd.h" file to provide DeInit() and WakeUp() services in IDD current measurement driver
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section6" aria-hidden="true">
|
||||
<label for="collapse-section6" aria-hidden="true">V2.1.0 / 06-February-2015</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
IDD current measurement driver function prototypes added (idd.h file)
|
||||
io.h: add new typedef enum IO_PinState with IO_PIN_RESET and IO_PIN_SET values
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section5" aria-hidden="true">
|
||||
<label for="collapse-section5" aria-hidden="true">V2.0.0 / 15-December-2014</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
Update "io.h" file to support MFX (Multi Function eXpander) device available on some STM32 boards
|
||||
|
||||
- add new entries for *IO_ModeTypedef* enumeration structure
|
||||
- update the *IO_DrvTypeDef* structure
|
||||
- Update all return values and function parameters to uint32_t
|
||||
- Add a return value for *Config* field
|
||||
|
||||
## Backward Compatibility
|
||||
|
||||
This release breaks compatibility with previous versions.
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section4" aria-hidden="true">
|
||||
<label for="collapse-section4" aria-hidden="true">V1.2.1 / 02-December-2014</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
gyro.h: change “__GIRO_H” by “__GYRO_H” to fix compilation issue under Mac OS
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section3" aria-hidden="true">
|
||||
<label for="collapse-section3" aria-hidden="true">V1.2.0 / 18-June-2014</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
EPD (E Paper Display) driver function prototype added (epd.h file)
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section2" aria-hidden="true">
|
||||
<label for="collapse-section2" aria-hidden="true">V1.1.0 / 21-March-2014</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
Temperature Sensor driver function prototype added
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section1" aria-hidden="true">
|
||||
<label for="collapse-section1" aria-hidden="true">V1.0.0 / 18-February-2014</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
First official release with Accelerometer, Audio, Camera, Gyroscope, IO, LCD and Touch Screen drivers function prototypes
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
:::
|
||||
:::
|
||||
|
||||
<footer class="sticky">
|
||||
For complete documentation on <mark>STM32 Microcontrollers</mark> ,
|
||||
visit: [http://www.st.com/STM32](http://www.st.com/STM32)
|
||||
</footer>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><g fill="#13254a"><path d="M100 .212C44.868.212 0 44.889 0 99.788c0 55.132 44.868 100 100 100s100-44.868 100-100C200 44.889 155.132.212 100 .212zm0 181.164c-44.974 0-81.587-36.614-81.587-81.587 0-44.762 36.614-81.164 81.587-81.164 44.995 0 81.587 36.402 81.587 81.164 0 44.973-36.592 81.587-81.587 81.587z" style="fill: #e6007e;"/><path d="M141.1 88.127h-29.439V58.688c0-6.392-5.185-11.598-11.598-11.598-6.413 0-11.619 5.206-11.619 11.598v29.439H58.476c-6.392 0-11.598 5.185-11.598 11.598 0 6.413 5.206 11.619 11.598 11.619h29.968v29.968c0 6.392 5.206 11.598 11.619 11.598 6.413 0 11.598-5.206 11.598-11.598v-29.968H141.1c6.392 0 11.598-5.206 11.598-11.619 0-6.413-5.206-11.598-11.598-11.598z" style="fill: #e6007e;"/></g></svg>
|
||||
|
After Width: | Height: | Size: 832 B |
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><g fill="#03234b"><path d="M170.934 64.569l-.04-.055-29.049 40.038-.057.079h14.867a59.366 59.366 0 0 1-1.488 15.615c-1.158 5.318-3.807 13.448-9.848 21.977-2.766 4.118-6.375 7.726-9.208 10.408-3.426 2.857-7.461 6.095-12 8.376-8.121 4.568-17.881 7.138-28.225 7.432-10.907.248-20.201-2.61-26.072-5.052-8.283-3.479-14.111-7.807-16.85-10.078-1.254-.956-2.25-1.907-3.057-2.676a28.662 28.662 0 0 0-1.157-1.069 158.874 158.874 0 0 0-1.479-1.362l-4.435-3.956 3.569 4.81.183.243c.2.263.548.722 1.048 1.389.276.334.579.747.93 1.226l.008.01c.689.939 1.546 2.107 2.664 3.322 3 3.536 8.178 8.801 15.808 13.801 5.969 3.866 15.672 8.901 28.001 10.935a79.05 79.05 0 0 0 12.485.998c7.97 0 15.651-1.228 22.828-3.649 6.366-1.877 12.192-4.981 17.053-7.771 6.16-3.936 10.817-7.586 14.654-11.488 8.084-7.899 14.884-17.913 19.15-28.199 3.259-7.594 5.456-15.727 6.529-24.175l.055-.425.083-.641H200l-29.066-40.063zM58.159 99.232l-12.655.563c-.097-.881-.159-1.986-.227-3.474a59.184 59.184 0 0 1 1.446-16.56c1.157-5.316 3.804-13.444 9.848-21.977 2.168-3.228 5.009-6.44 9.208-10.415 3.41-2.849 7.432-6.08 12.005-8.375 8.114-4.568 17.87-7.138 28.213-7.432 10.9-.25 20.196 2.607 26.072 5.045 8.258 3.473 14.105 7.812 16.857 10.091 1.257.951 2.253 1.904 3.057 2.673l.017.016c.43.411.801.766 1.136 1.051.475.438.841.777 1.091 1.01l.138.128.248.229 4.04 3.613-3.165-4.456c-.058-.083-.312-.417-.73-.971l-.507-.67a28.922 28.922 0 0 1-.901-1.192l-.02-.027c-.69-.945-1.548-2.121-2.677-3.346-3.002-3.537-8.182-8.803-15.813-13.801-5.964-3.865-15.662-8.9-27.997-10.935-8.484-1.363-21.496-2.009-35.313 2.651-6.355 1.88-12.186 4.983-17.054 7.772-6.163 3.944-10.82 7.595-14.654 11.488-8.079 7.894-14.882 17.909-19.155 28.2-3.268 7.624-5.463 15.757-6.523 24.173-.436 3.281-.642 5.421-.664 6.926L0 101.831l30.683 38.727.042.053 27.38-41.298.054-.081z" style="fill: #e6007e;"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
@@ -0,0 +1,105 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file audio.h
|
||||
* @author MCD Application Team
|
||||
* @brief This header file contains the common defines and functions prototypes
|
||||
* for the Audio driver.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2018 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 AUDIO_H
|
||||
#define AUDIO_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include <stdint.h>
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Components
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup AUDIO
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup AUDIO_Exported_Constants
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup AUDIO_Exported_Types
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/** @defgroup AUDIO_Driver_structure Audio Driver structure
|
||||
* @{
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int32_t (*Init)(void *, void *);
|
||||
int32_t (*DeInit)(void *);
|
||||
int32_t (*ReadID)(void *, uint32_t *);
|
||||
int32_t (*Play)(void *);
|
||||
int32_t (*Pause)(void *);
|
||||
int32_t (*Resume)(void *);
|
||||
int32_t (*Stop)(void *, uint32_t);
|
||||
int32_t (*SetFrequency)(void *, uint32_t);
|
||||
int32_t (*GetFrequency)(void *);
|
||||
int32_t (*SetVolume)(void *, uint32_t, uint8_t);
|
||||
int32_t (*GetVolume)(void *, uint32_t, uint8_t *);
|
||||
int32_t (*SetMute)(void *, uint32_t);
|
||||
int32_t (*SetOutputMode)(void *, uint32_t);
|
||||
int32_t (*SetResolution)(void *, uint32_t);
|
||||
int32_t (*GetResolution)(void *, uint32_t *);
|
||||
int32_t (*SetProtocol)(void *, uint32_t);
|
||||
int32_t (*GetProtocol)(void *, uint32_t *);
|
||||
int32_t (*Reset)(void *);
|
||||
} AUDIO_Drv_t;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* AUDIO_H */
|
||||
@@ -0,0 +1,106 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file camera.h
|
||||
* @author MCD Application Team
|
||||
* @brief This header file contains the common defines and functions prototypes
|
||||
* for the camera driver.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2018 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 CAMERA_H
|
||||
#define CAMERA_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include <stdint.h>
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Components
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup CAMERA
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/** @defgroup CAMERA_Exported_Types
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup CAMERA_Driver_structure Camera Driver structure
|
||||
* @{
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int32_t (*Init)(void *, uint32_t, uint32_t);
|
||||
int32_t (*DeInit)(void *);
|
||||
int32_t (*ReadID)(void *, uint32_t *);
|
||||
int32_t (*GetCapabilities)(void *, void *);
|
||||
int32_t (*SetLightMode)(void *, uint32_t);
|
||||
int32_t (*SetColorEffect)(void *, uint32_t);
|
||||
int32_t (*SetBrightness)(void *, int32_t);
|
||||
int32_t (*SetSaturation)(void *, int32_t);
|
||||
int32_t (*SetContrast)(void *, int32_t);
|
||||
int32_t (*SetHueDegree)(void *, int32_t);
|
||||
int32_t (*MirrorFlipConfig)(void *, uint32_t);
|
||||
int32_t (*ZoomConfig)(void *, uint32_t);
|
||||
int32_t (*SetResolution)(void *, uint32_t);
|
||||
int32_t (*GetResolution)(void *, uint32_t *);
|
||||
int32_t (*SetPixelFormat)(void *, uint32_t);
|
||||
int32_t (*GetPixelFormat)(void *, uint32_t *);
|
||||
int32_t (*NightModeConfig)(void *, uint32_t);
|
||||
int32_t (*SetFrequency)(void *, int32_t);
|
||||
int32_t (*SetGain)(void *, int32_t);
|
||||
int32_t (*SetExposure)(void *, int32_t);
|
||||
} CAMERA_Drv_t;
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup CAMERA_Exported_Constants
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CAMERA_H */
|
||||
@@ -0,0 +1,102 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file dpredriver.h
|
||||
* @author MCD Application Team
|
||||
* @brief This header file contains the functions prototypes for the
|
||||
* DisplayPort Linear Redriver.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2018 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 __DPREDRIVER_H
|
||||
#define __DPREDRIVER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include <stdint.h>
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Components
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup DPREDRIVER
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup DPREDRIVER_Exported_Types
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup DPREDRIVER_Channel_Identifier Channel Identifier
|
||||
* @{
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
CHANNEL_DP0 = 0,
|
||||
CHANNEL_DP1,
|
||||
CHANNEL_DP2,
|
||||
CHANNEL_DP3,
|
||||
CHANNEL_RX1,
|
||||
CHANNEL_RX2,
|
||||
CHANNEL_SSTX
|
||||
} DPREDRIVER_ChannelId_t;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup DPREDRIVER_Driver_structure DisplayPort Linear Redriver Driver structure
|
||||
* @{
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint32_t (*Init)(uint16_t);
|
||||
void (*DeInit)(uint16_t);
|
||||
uint32_t (*PowerOn)(uint16_t);
|
||||
uint32_t (*PowerOff)(uint16_t);
|
||||
uint32_t (*SetEQGain)(uint16_t, DPREDRIVER_ChannelId_t, uint8_t);
|
||||
uint32_t (*EnableChannel)(uint16_t, DPREDRIVER_ChannelId_t);
|
||||
uint32_t (*DisableChannel)(uint16_t, DPREDRIVER_ChannelId_t);
|
||||
} DPREDRIVER_Drv_t;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __DPREDRIVER_H */
|
||||
@@ -0,0 +1,95 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file env_sensor.h
|
||||
* @author MCD Application Team
|
||||
* @brief This header file contains the functions prototypes for the
|
||||
* environmental sensor driver
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2017 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 ENV_SENSOR_H
|
||||
#define ENV_SENSOR_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include <stdint.h>
|
||||
|
||||
/** @addtogroup BSP BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup COMPONENTS COMPONENTS
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup COMMON COMMON
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup ENV_SENSOR ENV SENSOR
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup ENV_SENSOR_Public_Types ENV SENSOR Public types
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief ENV SENSOR driver structure definition
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int32_t (*Init)(void *);
|
||||
int32_t (*DeInit)(void *);
|
||||
int32_t (*ReadID)(void *, uint8_t *);
|
||||
int32_t (*GetCapabilities)(void *, void *);
|
||||
} ENV_SENSOR_CommonDrv_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int32_t (*Enable)(void *);
|
||||
int32_t (*Disable)(void *);
|
||||
int32_t (*GetOutputDataRate)(void *, float *);
|
||||
int32_t (*SetOutputDataRate)(void *, float);
|
||||
int32_t (*GetValue)(void *, float *);
|
||||
} ENV_SENSOR_FuncDrv_t;
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ENV_SENSOR_H */
|
||||
@@ -0,0 +1,94 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file epd.h
|
||||
* @author MCD Application Team
|
||||
* @brief This file contains all the functions prototypes for the
|
||||
* EPD (E Paper Display) driver.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2015 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 __EPD_H
|
||||
#define __EPD_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include <stdint.h>
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Components
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Common
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup EPD
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup EPD_Exported_Types
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup EPD_Driver_structure E Paper Display Driver structure
|
||||
* @{
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
void (*Init)(void);
|
||||
void (*WritePixel)(uint8_t);
|
||||
|
||||
/* Optimized operation */
|
||||
void (*SetDisplayWindow)(uint16_t, uint16_t, uint16_t, uint16_t);
|
||||
void (*RefreshDisplay)(void);
|
||||
void (*CloseChargePump)(void);
|
||||
|
||||
uint16_t (*GetEpdPixelWidth)(void);
|
||||
uint16_t (*GetEpdPixelHeight)(void);
|
||||
void (*DrawImage)(uint16_t, uint16_t, uint16_t, uint16_t, uint8_t *);
|
||||
}
|
||||
EPD_DrvTypeDef;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EPD_H */
|
||||
@@ -0,0 +1,108 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file hybrid_sensor.h
|
||||
* @author MCD Application Team
|
||||
* @brief This header file contains the functions prototypes for the
|
||||
* hybrid sensor driver
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 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 HYBRID_SENSOR_H
|
||||
#define HYBRID_SENSOR_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include <stdint.h>
|
||||
|
||||
/** @addtogroup BSP BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup COMPONENTS COMPONENTS
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup COMMON COMMON
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup HYBRID_SENSOR HYBRID SENSOR
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup HYBRID_SENSOR_Public_Types HYBRID SENSOR Public types
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief HYBRID SENSOR driver structure definition
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int32_t (*Init)(void *);
|
||||
int32_t (*DeInit)(void *);
|
||||
int32_t (*ReadID)(void *, uint8_t *);
|
||||
int32_t (*GetCapabilities)(void *, void *);
|
||||
} HYBRID_SENSOR_CommonDrv_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int32_t (*Enable)(void *);
|
||||
int32_t (*Disable)(void *);
|
||||
int32_t (*GetOutputDataRate)(void *, float *);
|
||||
int32_t (*SetOutputDataRate)(void *, float);
|
||||
int32_t (*GetValue)(void *, float *);
|
||||
} HYBRID_ENV_SENSOR_FuncDrv_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int32_t (*Enable)(void *);
|
||||
int32_t (*Disable)(void *);
|
||||
int32_t (*GetSensitivity)(void *, float *);
|
||||
int32_t (*GetOutputDataRate)(void *, float *);
|
||||
int32_t (*SetOutputDataRate)(void *, float);
|
||||
int32_t (*GetFullScale)(void *, int32_t *);
|
||||
int32_t (*SetFullScale)(void *, int32_t);
|
||||
int32_t (*GetAxes)(void *, void *);
|
||||
int32_t (*GetAxesRaw)(void *, void *);
|
||||
} HYBRID_MOTION_SENSOR_FuncDrv_t;
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* HYBRID_SENSOR_H */
|
||||
@@ -0,0 +1,95 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file idd.h
|
||||
* @author MCD Application Team
|
||||
* @brief This file contains all the functions prototypes for the IDD driver.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2018 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 IDD_H
|
||||
#define IDD_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include <stdint.h>
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Components
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup IDD
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup IDD_Exported_Types IDD Exported Types
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup IDD_Driver_structure IDD Driver structure
|
||||
* @{
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int32_t (*Init)(void *);
|
||||
int32_t (*DeInit)(void *);
|
||||
int32_t (*ReadID)(void *, uint32_t *);
|
||||
int32_t (*Reset)(void *);
|
||||
int32_t (*LowPower)(void *);
|
||||
int32_t (*WakeUp)(void *);
|
||||
int32_t (*Start)(void *);
|
||||
int32_t (*Config)(void *, void *);
|
||||
int32_t (*GetValue)(void *, uint32_t *);
|
||||
int32_t (*EnableIT)(void *);
|
||||
int32_t (*DisableIT)(void *);
|
||||
int32_t (*ITStatus)(void *);
|
||||
int32_t (*ClearIT)(void *);
|
||||
int32_t (*ErrorEnableIT)(void *);
|
||||
int32_t (*ErrorClearIT)(void *);
|
||||
int32_t (*ErrorGetITStatus)(void *);
|
||||
int32_t (*ErrorDisableIT)(void *);
|
||||
int32_t (*ErrorGetSrc)(void *);
|
||||
int32_t (*ErrorGetCode)(void *);
|
||||
} IDD_Drv_t;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* IDD_H */
|
||||
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file io.h
|
||||
* @author MCD Application Team
|
||||
* @brief This file contains all the functions prototypes for the IO driver.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2018 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 IO_H
|
||||
#define IO_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include <stdint.h>
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Components
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup IO
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup IO_Exported_Types IO Exported Types
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup IO_Driver_structure IO Driver structure
|
||||
* @{
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int32_t (*Init)(void *, void *);
|
||||
int32_t (*DeInit)(void *);
|
||||
int32_t (*ReadID)(void *, uint32_t *);
|
||||
int32_t (*Reset)(void *);
|
||||
int32_t (*Start)(void *, uint32_t);
|
||||
int32_t (*WritePin)(void *, uint32_t, uint8_t);
|
||||
int32_t (*ReadPin)(void *, uint32_t);
|
||||
int32_t (*EnableIT)(void *);
|
||||
int32_t (*DisableIT)(void *);
|
||||
int32_t (*ITStatus)(void *, uint32_t);
|
||||
int32_t (*ClearIT)(void *, uint32_t);
|
||||
} IO_Drv_t;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* IO_H */
|
||||
@@ -0,0 +1,130 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file lcd.h
|
||||
* @author MCD Application Team
|
||||
* @brief This file contains all the functions prototypes for the LCD driver.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2018 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 LCD_H
|
||||
#define LCD_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include <stdint.h>
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Components
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup LCD
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup LCD_Exported_Constants LCD Exported Constants
|
||||
* @{
|
||||
*/
|
||||
#define LCD_PIXEL_FORMAT_ARGB8888 0x00000000U /*!< ARGB8888 LTDC pixel format */
|
||||
#define LCD_PIXEL_FORMAT_RGB888 0x00000001U /*!< RGB888 LTDC pixel format */
|
||||
#define LCD_PIXEL_FORMAT_RGB565 0x00000002U /*!< RGB565 LTDC pixel format */
|
||||
#define LCD_PIXEL_FORMAT_ARGB1555 0x00000003U /*!< ARGB1555 LTDC pixel format */
|
||||
#define LCD_PIXEL_FORMAT_ARGB4444 0x00000004U /*!< ARGB4444 LTDC pixel format */
|
||||
#define LCD_PIXEL_FORMAT_L8 0x00000005U /*!< L8 LTDC pixel format */
|
||||
#define LCD_PIXEL_FORMAT_AL44 0x00000006U /*!< AL44 LTDC pixel format */
|
||||
#define LCD_PIXEL_FORMAT_AL88 0x00000007U /*!< AL88 LTDC pixel format */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup LCD_Exported_Types
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup LCD_Driver_structure LCD Driver structure
|
||||
* @{
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int32_t (*DrawBitmap)(uint32_t, uint32_t, uint32_t, uint8_t *);
|
||||
int32_t (*FillRGBRect)(uint32_t, uint32_t, uint32_t, uint8_t *, uint32_t, uint32_t);
|
||||
int32_t (*DrawHLine)(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
|
||||
int32_t (*DrawVLine)(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
|
||||
int32_t (*FillRect)(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
|
||||
int32_t (*GetPixel)(uint32_t, uint32_t, uint32_t, uint32_t *);
|
||||
int32_t (*SetPixel)(uint32_t, uint32_t, uint32_t, uint32_t);
|
||||
int32_t (*GetXSize)(uint32_t, uint32_t *);
|
||||
int32_t (*GetYSize)(uint32_t, uint32_t *);
|
||||
int32_t (*SetLayer)(uint32_t, uint32_t);
|
||||
int32_t (*GetFormat)(uint32_t, uint32_t *);
|
||||
} LCD_UTILS_Drv_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* Control functions */
|
||||
int32_t (*Init)(void *, uint32_t, uint32_t);
|
||||
int32_t (*DeInit)(void *);
|
||||
int32_t (*ReadID)(void *, uint32_t *);
|
||||
int32_t (*DisplayOn)(void *);
|
||||
int32_t (*DisplayOff)(void *);
|
||||
int32_t (*SetBrightness)(void *, uint32_t);
|
||||
int32_t (*GetBrightness)(void *, uint32_t *);
|
||||
int32_t (*SetOrientation)(void *, uint32_t);
|
||||
int32_t (*GetOrientation)(void *, uint32_t *);
|
||||
|
||||
/* Drawing functions*/
|
||||
int32_t (*SetCursor)(void *, uint32_t, uint32_t);
|
||||
int32_t (*DrawBitmap)(void *, uint32_t, uint32_t, uint8_t *);
|
||||
int32_t (*FillRGBRect)(void *, uint32_t, uint32_t, uint8_t *, uint32_t, uint32_t);
|
||||
int32_t (*DrawHLine)(void *, uint32_t, uint32_t, uint32_t, uint32_t);
|
||||
int32_t (*DrawVLine)(void *, uint32_t, uint32_t, uint32_t, uint32_t);
|
||||
int32_t (*FillRect)(void *, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
|
||||
int32_t (*GetPixel)(void *, uint32_t, uint32_t, uint32_t *);
|
||||
int32_t (*SetPixel)(void *, uint32_t, uint32_t, uint32_t);
|
||||
int32_t (*GetXSize)(void *, uint32_t *);
|
||||
int32_t (*GetYSize)(void *, uint32_t *);
|
||||
} LCD_Drv_t;
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LCD_H */
|
||||
@@ -0,0 +1,85 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file light_sensor.h
|
||||
* @author IMG SW Application Team
|
||||
* @brief This header file contains the common defines and functions prototypes
|
||||
* for the light sensor driver.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 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 LIGHT_SENSOR_H
|
||||
#define LIGHT_SENSOR_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include <stdint.h>
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Components
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup LIGHT_SENSOR
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup LIGHT_SENSOR_Driver_structure Ranging sensor Driver structure
|
||||
* @{
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int32_t (*Init)(void *);
|
||||
int32_t (*DeInit)(void *);
|
||||
int32_t (*ReadID)(void *, uint32_t *);
|
||||
int32_t (*GetCapabilities)(void *, void *);
|
||||
int32_t (*SetExposureTime)(void *, uint32_t);
|
||||
int32_t (*GetExposureTime)(void *, uint32_t *);
|
||||
int32_t (*SetGain)(void *, uint8_t, uint32_t);
|
||||
int32_t (*GetGain)(void *, uint8_t, uint32_t *);
|
||||
int32_t (*SetInterMeasurementTime)(void *, uint32_t);
|
||||
int32_t (*GetInterMeasurementTime)(void *, uint32_t *);
|
||||
int32_t (*Start)(void *, uint32_t);
|
||||
int32_t (*Stop)(void *);
|
||||
int32_t (*StartFlicker)(void *, uint8_t, uint8_t);
|
||||
int32_t (*StopFlicker)(void *);
|
||||
int32_t (*GetValues)(void *, uint32_t *);
|
||||
int32_t (*SetControlMode)(void *, uint32_t, uint32_t);
|
||||
} LIGHT_SENSOR_Drv_t;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIGHT_SENSOR_H */
|
||||
@@ -0,0 +1,99 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file motion_sensor.h
|
||||
* @author MCD Application Team
|
||||
* @brief This header file contains the functions prototypes for the
|
||||
* motion sensor driver
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2017 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 MOTION_SENSOR_H
|
||||
#define MOTION_SENSOR_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include <stdint.h>
|
||||
|
||||
/** @addtogroup BSP BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup COMPONENTS COMPONENTS
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup COMMON COMMON
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup MOTION_SENSOR MOTION SENSOR
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup MOTION_SENSOR_Public_Types MOTION SENSOR Public types
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief MOTION SENSOR driver structure definition
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int32_t (*Init)(void *);
|
||||
int32_t (*DeInit)(void *);
|
||||
int32_t (*ReadID)(void *, uint8_t *);
|
||||
int32_t (*GetCapabilities)(void *, void *);
|
||||
} MOTION_SENSOR_CommonDrv_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int32_t (*Enable)(void *);
|
||||
int32_t (*Disable)(void *);
|
||||
int32_t (*GetSensitivity)(void *, float *);
|
||||
int32_t (*GetOutputDataRate)(void *, float *);
|
||||
int32_t (*SetOutputDataRate)(void *, float);
|
||||
int32_t (*GetFullScale)(void *, int32_t *);
|
||||
int32_t (*SetFullScale)(void *, int32_t);
|
||||
int32_t (*GetAxes)(void *, void *);
|
||||
int32_t (*GetAxesRaw)(void *, void *);
|
||||
} MOTION_SENSOR_FuncDrv_t;
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MOTION_SENSOR_H */
|
||||
@@ -0,0 +1,251 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file pwrmon.h
|
||||
* @author MCD Application Team
|
||||
* @brief This header file contains the functions prototypes for the
|
||||
* Current/Power Monitor device driver.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2018 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 __PWRMON_H
|
||||
#define __PWRMON_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include <stdint.h>
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Components
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup PWRMON
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup PWRMON_Exported_Types
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup PWRMON_Operating_Mode_enum Power Monitor Operating Mode enums
|
||||
* @{
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
OPERATING_MODE_TRIGGERED = 0,
|
||||
OPERATING_MODE_CONTINUOUS,
|
||||
OPERATING_MODE_NB
|
||||
} PWRMON_OperatingMode_t;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup PWRMON_Conversion_Time_enum Power Monitor Conversion_Time enums
|
||||
* @{
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
CONVERT_TIME_140 = 0,
|
||||
CONVERT_TIME_204,
|
||||
CONVERT_TIME_332,
|
||||
CONVERT_TIME_588,
|
||||
CONVERT_TIME_1100,
|
||||
CONVERT_TIME_2116,
|
||||
CONVERT_TIME_4156,
|
||||
CONVERT_TIME_8244,
|
||||
CONVERT_TIME_NB
|
||||
} PWRMON_ConvertTime_t;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup PWRMON_Conversion_Time_enum Power Monitor Conversion_Time enums
|
||||
* @{
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
AVERAGING_MODE_1 = 0,
|
||||
AVERAGING_MODE_4,
|
||||
AVERAGING_MODE_16,
|
||||
AVERAGING_MODE_64,
|
||||
AVERAGING_MODE_128,
|
||||
AVERAGING_MODE_256,
|
||||
AVERAGING_MODE_512,
|
||||
AVERAGING_MODE_1024,
|
||||
AVERAGING_MODE_NB
|
||||
} PWRMON_AveragingMode_t;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup PWRMON_Device_Configuration_structure Power Monitor Device Configuration structure
|
||||
* @{
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
PWRMON_ConvertTime_t ShuntConvertTime;
|
||||
PWRMON_ConvertTime_t BusConvertTime;
|
||||
PWRMON_AveragingMode_t AveragingMode;
|
||||
} PWRMON_Config_t;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup PWRMON_Alert_Polarity_enum Power Monitor Alert Polarity enums
|
||||
* @{
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
ALERT_POLARITY_NORMAL = 0,
|
||||
ALERT_POLARITY_INVERTED,
|
||||
ALERT_POLARITY_NB
|
||||
} PWRMON_AlertPolarity_t;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup PWRMON_Alert_Latch_Enable_enum Power Monitor Alert Latch Enable enums
|
||||
* @{
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
ALERT_LATCH_DISABLE = 0,
|
||||
ALERT_LATCH_ENABLE,
|
||||
ALERT_LATCH_NB
|
||||
} PWRMON_AlertLatchEnable_t;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup PWRMON_Alert_Function_enum Power Monitor Alert Function enums
|
||||
* @{
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
ALERT_FUNCTION_NONE = 0,
|
||||
ALERT_FUNCTION_SOL,
|
||||
ALERT_FUNCTION_SUL,
|
||||
ALERT_FUNCTION_BOL,
|
||||
ALERT_FUNCTION_BUL,
|
||||
ALERT_FUNCTION_POL,
|
||||
ALERT_FUNCTION_NB,
|
||||
} PWRMON_AlertFunction_t;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup PWRMON_Alert_Configuration_structure Power Monitor Alert Configuration structure
|
||||
* @{
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
PWRMON_AlertPolarity_t Polarity;
|
||||
PWRMON_AlertLatchEnable_t LatchEnable;
|
||||
} PWRMON_AlertPinConfig_t;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup PWRMON_Voltage_Input_enum Power Monitor Voltage Input enums
|
||||
* @{
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
VOLTAGE_INPUT_SHUNT = 0,
|
||||
VOLTAGE_INPUT_BUS,
|
||||
VOLTAGE_INPUT_ALL,
|
||||
VOLTAGE_INPUT_NB
|
||||
} PWRMON_InputSignal_t;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup PWRMON_Flag_enum Power Monitor Flag enums
|
||||
* @{
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FLAG_ALERT_FUNCTION = 0,
|
||||
FLAG_CONVERSION_READY,
|
||||
FLAG_MATH_OVERFLOW,
|
||||
FLAG_NB
|
||||
} PWRMON_Flag_t;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup PWRMON_Driver_structure Power Monitor Driver structure
|
||||
* @{
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
void (*Init)(uint16_t, PWRMON_Config_t *);
|
||||
void (*DeInit)(uint16_t);
|
||||
uint16_t (*ReadId)(uint16_t);
|
||||
void (*Reset)(uint16_t);
|
||||
void (*SetCalibration)(uint16_t, uint16_t);
|
||||
uint16_t (*GetCalibration)(uint16_t);
|
||||
void (*SetAlertFunction)(uint16_t, PWRMON_AlertFunction_t);
|
||||
PWRMON_AlertFunction_t (*GetAlertFunction)(uint16_t);
|
||||
void (*AlertPinConfig)(uint16_t, PWRMON_AlertPinConfig_t *);
|
||||
void (*SetVBusThreshold)(uint16_t, uint16_t);
|
||||
uint16_t (*GetVBusThreshold)(uint16_t);
|
||||
void (*SetVShuntThreshold)(uint16_t, int16_t);
|
||||
int16_t (*GetVShuntThreshold)(uint16_t);
|
||||
void (*SetPowerThreshold)(uint16_t, uint32_t);
|
||||
uint32_t (*GetPowerThreshold)(uint16_t);
|
||||
void (*AlertThresholdEnableIT)(uint16_t);
|
||||
void (*AlertThresholdDisableIT)(uint16_t);
|
||||
void (*ConversionReadyEnableIT)(uint16_t);
|
||||
void (*ConversionReadyDisableIT)(uint16_t);
|
||||
void (*StartConversion)(uint16_t, PWRMON_InputSignal_t, PWRMON_OperatingMode_t);
|
||||
void (*StopConversion)(uint16_t);
|
||||
uint16_t (*GetVBus)(uint16_t);
|
||||
int16_t (*GetVShunt)(uint16_t);
|
||||
uint16_t (*GetPower)(uint16_t);
|
||||
int16_t (*GetCurrent)(uint16_t);
|
||||
uint8_t (*GetFlag)(uint16_t, PWRMON_Flag_t);
|
||||
} PWRMON_Drv_t;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __PWRMON_H */
|
||||
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file ranging_sensor.h
|
||||
* @author IMG SW Application Team
|
||||
* @brief This header file contains the common defines and functions prototypes
|
||||
* for the ranging sensor driver.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 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 RANGING_SENSOR_H
|
||||
#define RANGING_SENSOR_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include <stdint.h>
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Components
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup RANGING_SENSOR
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup RANGING_SENSOR_Driver_structure Ranging sensor Driver structure
|
||||
* @{
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int32_t (*Init)(void *);
|
||||
int32_t (*DeInit)(void *);
|
||||
int32_t (*ReadID)(void *, uint32_t *);
|
||||
int32_t (*GetCapabilities)(void *, void *);
|
||||
int32_t (*ConfigProfile)(void *, void *);
|
||||
int32_t (*ConfigROI)(void *, void *);
|
||||
int32_t (*ConfigIT)(void *, void *);
|
||||
int32_t (*GetDistance)(void *, void *);
|
||||
int32_t (*Start)(void *, uint32_t);
|
||||
int32_t (*Stop)(void *);
|
||||
int32_t (*SetAddress)(void *, uint32_t);
|
||||
int32_t (*GetAddress)(void *, uint32_t *);
|
||||
int32_t (*SetPowerMode)(void *, uint32_t);
|
||||
int32_t (*GetPowerMode)(void *, uint32_t *);
|
||||
} RANGING_SENSOR_Drv_t;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* RANGING_SENSOR_H */
|
||||
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file ts.h
|
||||
* @author MCD Application Team
|
||||
* @brief This file contains all the functions prototypes for the Touch Screen driver.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2018 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 TS_H
|
||||
#define TS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include <stdint.h>
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Components
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup TS
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup TS_Exported_Types
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup TS_Driver_structure Touch Sensor Driver structure
|
||||
* @{
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int32_t (*Init)(void *);
|
||||
int32_t (*DeInit)(void *);
|
||||
int32_t (*GestureConfig)(void *, void *);
|
||||
int32_t (*ReadID)(void *, uint32_t *);
|
||||
int32_t (*GetState)(void *, void *);
|
||||
int32_t (*GetMultiTouchState)(void *, void *);
|
||||
int32_t (*GetGesture)(void *, void *);
|
||||
int32_t (*GetCapabilities)(void *, void *);
|
||||
int32_t (*EnableIT)(void *);
|
||||
int32_t (*DisableIT)(void *);
|
||||
int32_t (*ClearIT)(void *);
|
||||
int32_t (*ITStatus)(void *);
|
||||
} TS_Drv_t;
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* TS_H */
|
||||
@@ -0,0 +1,112 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file usbtypecswitch.h
|
||||
* @author MCD Application Team
|
||||
* @brief This header file contains the functions prototypes for the
|
||||
* crossbar switch device for USB Type-C systems.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2018 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 __USBTYPECSWITCH_H
|
||||
#define __USBTYPECSWITCH_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include <stdint.h>
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Components
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup TYPECSWITCH
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup TYPECSWITCH_Exported_Types
|
||||
* @{
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
USB_NORMAL = 0,
|
||||
USB_FLIPPED,
|
||||
DFP_D_PIN_ASSIGNMENT_A_NORMAL,
|
||||
DFP_D_PIN_ASSIGNMENT_A_FLIPPED,
|
||||
DFP_D_PIN_ASSIGNMENT_B_NORMAL,
|
||||
DFP_D_PIN_ASSIGNMENT_B_FLIPPED,
|
||||
DFP_D_PIN_ASSIGNMENT_C_NORMAL,
|
||||
DFP_D_PIN_ASSIGNMENT_C_FLIPPED,
|
||||
DFP_D_PIN_ASSIGNMENT_D_NORMAL,
|
||||
DFP_D_PIN_ASSIGNMENT_D_FLIPPED,
|
||||
DFP_D_PIN_ASSIGNMENT_E_NORMAL,
|
||||
DFP_D_PIN_ASSIGNMENT_E_FLIPPED,
|
||||
DFP_D_PIN_ASSIGNMENT_F_NORMAL,
|
||||
DFP_D_PIN_ASSIGNMENT_F_FLIPPED,
|
||||
UFP_D_PIN_ASSIGNMENT_A_NORMAL,
|
||||
UFP_D_PIN_ASSIGNMENT_A_FLIPPED,
|
||||
UFP_D_PIN_ASSIGNMENT_B_NORMAL,
|
||||
UFP_D_PIN_ASSIGNMENT_B_FLIPPED,
|
||||
UFP_D_PIN_ASSIGNMENT_C_NORMAL,
|
||||
UFP_D_PIN_ASSIGNMENT_C_FLIPPED,
|
||||
UFP_D_PIN_ASSIGNMENT_D_NORMAL,
|
||||
UFP_D_PIN_ASSIGNMENT_D_FLIPPED,
|
||||
UFP_D_PIN_ASSIGNMENT_E_NORMAL,
|
||||
UFP_D_PIN_ASSIGNMENT_E_FLIPPED,
|
||||
UFP_D_PIN_ASSIGNMENT_F_NORMAL,
|
||||
UFP_D_PIN_ASSIGNMENT_F_FLIPPED
|
||||
} TYPECSWITCH_Mode_t;
|
||||
|
||||
/** @defgroup TYPECSWITCH_Driver_structure USB Type-C Crossbar Switch Driver structure
|
||||
* @{
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint32_t (*Init)(uint16_t);
|
||||
void (*DeInit)(uint16_t);
|
||||
uint32_t (*PowerOn)(uint16_t);
|
||||
uint32_t (*PowerOff)(uint16_t);
|
||||
uint32_t (*SetMode)(uint16_t, TYPECSWITCH_Mode_t);
|
||||
uint32_t (*IsSupportedMode)(TYPECSWITCH_Mode_t);
|
||||
} TYPECSWITCH_Drv_t;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __USBTYPECSWITCH_H */
|
||||
@@ -0,0 +1,27 @@
|
||||
Copyright 2020(-2023) STMicroelectronics.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation and/or
|
||||
other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,6 @@
|
||||
This software component is provided to you as part of a software package and
|
||||
applicable license terms are in the Package_license file. If you received this
|
||||
software component outside of a package or without applicable license terms,
|
||||
the terms of the BSD-3-Clause license shall apply.
|
||||
You may obtain a copy of the BSD-3-Clause at:
|
||||
https://opensource.org/licenses/BSD-3-Clause
|
||||
@@ -0,0 +1,110 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
<title>Release Notes for APS256XX 16-Bits OCTOSPI Component Driver</title>
|
||||
<style type="text/css">
|
||||
code{white-space: pre-wrap;}
|
||||
span.smallcaps{font-variant: small-caps;}
|
||||
span.underline{text-decoration: underline;}
|
||||
div.column{display: inline-block; vertical-align: top; width: 50%;}
|
||||
</style>
|
||||
<link rel="stylesheet" href="_htmresc/mini-st_2020.css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<link rel="icon" type="image/x-icon" href="_htmresc/favicon.png" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-lg-4">
|
||||
<center>
|
||||
<h1 id="release-notes-for-aps256xx-component-driver">Release Notes for <mark>APS256XX</mark> Component Driver</h1>
|
||||
<p>Copyright © 2020 STMicroelectronics<br />
|
||||
</p>
|
||||
<a href="https://www.st.com" class="logo"><img src="_htmresc/st_logo_2020.png" alt="ST logo" /></a>
|
||||
</center>
|
||||
<h1 id="purpose">Purpose</h1>
|
||||
<p>This driver provides a set of functions offered by APS256XX 16-Bits OCTOSPI component</p>
|
||||
</div>
|
||||
<div class="col-sm-12 col-lg-8">
|
||||
<h1 id="update-history">Update History</h1>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section6" checked aria-hidden="true"> <label for="collapse-section6" aria-hidden="true"><strong>V1.0.6 / 08-December-2023</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes">Main Changes</h2>
|
||||
<ul>
|
||||
<li>Set correct bit in MR6 register to enter power down</li>
|
||||
<li>Correct MISRA-C 2012 warning</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section5" aria-hidden="true"> <label for="collapse-section5" aria-hidden="true"><strong>V1.0.5 / 12-December-2022</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes-1">Main Changes</h2>
|
||||
<ul>
|
||||
<li>Add XSPI_CCR_SIOO macro</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section4" aria-hidden="true"> <label for="collapse-section4" aria-hidden="true"><strong>V1.0.4 / 09-February-2022</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes-2">Main Changes</h2>
|
||||
<ul>
|
||||
<li>Update license</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section4" aria-hidden="true"> <label for="collapse-section4" aria-hidden="true"><strong>V1.0.3 / 06-October-2021</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes-3">Main Changes</h2>
|
||||
<ul>
|
||||
<li>Initialize sCommand structure as 0 in “Enable Memory mapped” API to avoid Issues related to non-filled sCommand field</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section3" aria-hidden="true"> <label for="collapse-section3" aria-hidden="true"><strong>V1.0.2 / 23-September-2021</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes-4">Main Changes</h2>
|
||||
<ul>
|
||||
<li>Code formatting and spelling</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section2" aria-hidden="true"> <label for="collapse-section2" aria-hidden="true"><strong>V1.0.1 / 30-April-2021</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes-5">Main Changes</h2>
|
||||
<ul>
|
||||
<li>Code formatting and spelling</li>
|
||||
<li>Update memory Command configuration values</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section1" aria-hidden="true"> <label for="collapse-section1" aria-hidden="true"><strong>V1.0.0 / 27-March-2020</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes-6">Main Changes</h2>
|
||||
<ul>
|
||||
<li>First Official Release of APS256XX 16-bits SPI Component drivers in line with STM32Cube BSP drivers development guidelines (UM2298)</li>
|
||||
<li>The component drivers are composed of
|
||||
<ul>
|
||||
<li>component core drivers files: aps256xx.h/.c</li>
|
||||
<li>component configuration file: aps256xx_conf_template.h</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="sticky">
|
||||
For complete documentation on <mark>STM32 Microcontrollers</mark> , visit: <span style="font-color: blue;"><a href="http://www.st.com/STM32">www.st.com</a></span>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,120 @@
|
||||
---
|
||||
pagetitle: Release Notes for APS256XX 16-Bits OCTOSPI Component Driver
|
||||
lang: en
|
||||
header-includes: <link rel="icon" type="image/x-icon" href="_htmresc/favicon.png" />
|
||||
---
|
||||
::: {.row}
|
||||
::: {.col-sm-12 .col-lg-4}
|
||||
|
||||
<center>
|
||||
# Release Notes for <mark>APS256XX</mark> Component Driver
|
||||
Copyright © 2020 STMicroelectronics\
|
||||
|
||||
[](https://www.st.com){.logo}
|
||||
</center>
|
||||
|
||||
# Purpose
|
||||
|
||||
This driver provides a set of functions offered by APS256XX 16-Bits OCTOSPI component
|
||||
|
||||
:::
|
||||
|
||||
::: {.col-sm-12 .col-lg-8}
|
||||
# Update History
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section6" checked aria-hidden="true">
|
||||
<label for="collapse-section6" aria-hidden="true">__V1.0.6 / 08-December-2023__</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
- Set correct bit in MR6 register to enter power down
|
||||
- Correct MISRA-C 2012 warning
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section5" aria-hidden="true">
|
||||
<label for="collapse-section5" aria-hidden="true">__V1.0.5 / 12-December-2022__</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
- Add XSPI_CCR_SIOO macro
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section4" aria-hidden="true">
|
||||
<label for="collapse-section4" aria-hidden="true">__V1.0.4 / 09-February-2022__</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
- Update license
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section4" aria-hidden="true">
|
||||
<label for="collapse-section4" aria-hidden="true">__V1.0.3 / 06-October-2021__</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
- Initialize sCommand structure as 0 in “Enable Memory mapped” API to avoid Issues related to non-filled sCommand field
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section3" aria-hidden="true">
|
||||
<label for="collapse-section3" aria-hidden="true">__V1.0.2 / 23-September-2021__</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
- Code formatting and spelling
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section2" aria-hidden="true">
|
||||
<label for="collapse-section2" aria-hidden="true">__V1.0.1 / 30-April-2021__</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
- Code formatting and spelling
|
||||
- Update memory Command configuration values
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section1" aria-hidden="true">
|
||||
<label for="collapse-section1" aria-hidden="true">__V1.0.0 / 27-March-2020__</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
- First Official Release of APS256XX 16-bits SPI Component drivers in line with STM32Cube BSP drivers development guidelines (UM2298)
|
||||
- The component drivers are composed of
|
||||
- component core drivers files: aps256xx.h/.c
|
||||
- component configuration file: aps256xx_conf_template.h
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
:::
|
||||
:::
|
||||
|
||||
<footer class="sticky">
|
||||
For complete documentation on <mark>STM32 Microcontrollers</mark> ,
|
||||
visit: [[www.st.com](http://www.st.com/STM32)]{style="font-color: blue;"}
|
||||
</footer>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><g fill="#13254a"><path d="M100 .212C44.868.212 0 44.889 0 99.788c0 55.132 44.868 100 100 100s100-44.868 100-100C200 44.889 155.132.212 100 .212zm0 181.164c-44.974 0-81.587-36.614-81.587-81.587 0-44.762 36.614-81.164 81.587-81.164 44.995 0 81.587 36.402 81.587 81.164 0 44.973-36.592 81.587-81.587 81.587z" style="fill: #e6007e;"/><path d="M141.1 88.127h-29.439V58.688c0-6.392-5.185-11.598-11.598-11.598-6.413 0-11.619 5.206-11.619 11.598v29.439H58.476c-6.392 0-11.598 5.185-11.598 11.598 0 6.413 5.206 11.619 11.598 11.619h29.968v29.968c0 6.392 5.206 11.598 11.619 11.598 6.413 0 11.598-5.206 11.598-11.598v-29.968H141.1c6.392 0 11.598-5.206 11.598-11.619 0-6.413-5.206-11.598-11.598-11.598z" style="fill: #e6007e;"/></g></svg>
|
||||
|
After Width: | Height: | Size: 832 B |
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><g fill="#03234b"><path d="M170.934 64.569l-.04-.055-29.049 40.038-.057.079h14.867a59.366 59.366 0 0 1-1.488 15.615c-1.158 5.318-3.807 13.448-9.848 21.977-2.766 4.118-6.375 7.726-9.208 10.408-3.426 2.857-7.461 6.095-12 8.376-8.121 4.568-17.881 7.138-28.225 7.432-10.907.248-20.201-2.61-26.072-5.052-8.283-3.479-14.111-7.807-16.85-10.078-1.254-.956-2.25-1.907-3.057-2.676a28.662 28.662 0 0 0-1.157-1.069 158.874 158.874 0 0 0-1.479-1.362l-4.435-3.956 3.569 4.81.183.243c.2.263.548.722 1.048 1.389.276.334.579.747.93 1.226l.008.01c.689.939 1.546 2.107 2.664 3.322 3 3.536 8.178 8.801 15.808 13.801 5.969 3.866 15.672 8.901 28.001 10.935a79.05 79.05 0 0 0 12.485.998c7.97 0 15.651-1.228 22.828-3.649 6.366-1.877 12.192-4.981 17.053-7.771 6.16-3.936 10.817-7.586 14.654-11.488 8.084-7.899 14.884-17.913 19.15-28.199 3.259-7.594 5.456-15.727 6.529-24.175l.055-.425.083-.641H200l-29.066-40.063zM58.159 99.232l-12.655.563c-.097-.881-.159-1.986-.227-3.474a59.184 59.184 0 0 1 1.446-16.56c1.157-5.316 3.804-13.444 9.848-21.977 2.168-3.228 5.009-6.44 9.208-10.415 3.41-2.849 7.432-6.08 12.005-8.375 8.114-4.568 17.87-7.138 28.213-7.432 10.9-.25 20.196 2.607 26.072 5.045 8.258 3.473 14.105 7.812 16.857 10.091 1.257.951 2.253 1.904 3.057 2.673l.017.016c.43.411.801.766 1.136 1.051.475.438.841.777 1.091 1.01l.138.128.248.229 4.04 3.613-3.165-4.456c-.058-.083-.312-.417-.73-.971l-.507-.67a28.922 28.922 0 0 1-.901-1.192l-.02-.027c-.69-.945-1.548-2.121-2.677-3.346-3.002-3.537-8.182-8.803-15.813-13.801-5.964-3.865-15.662-8.9-27.997-10.935-8.484-1.363-21.496-2.009-35.313 2.651-6.355 1.88-12.186 4.983-17.054 7.772-6.163 3.944-10.82 7.595-14.654 11.488-8.079 7.894-14.882 17.909-19.155 28.2-3.268 7.624-5.463 15.757-6.523 24.173-.436 3.281-.642 5.421-.664 6.926L0 101.831l30.683 38.727.042.053 27.38-41.298.054-.081z" style="fill: #e6007e;"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
@@ -0,0 +1,536 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file aps256xx.c
|
||||
* @modify MCD Application Team
|
||||
* @brief This file provides the APS256XX HSPI drivers.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 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 "aps256xx.h"
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Components
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup APS256XX APS256XX
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup APS256XX_Exported_Functions APS256XX Exported Functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
/* Read/Write Array Commands *********************/
|
||||
/**
|
||||
* @brief Reads an amount of data from the memory.
|
||||
* @param Ctx Component object pointer
|
||||
* @param pData Pointer to data to be read
|
||||
* @param ReadAddr Read start address
|
||||
* @param Size Size of data to read
|
||||
* @param LatencyCode Latency used for the access
|
||||
* @param IOMode I/O Mode used for the access
|
||||
* @param BurstType Type of burst used for the access
|
||||
* @retval Memory status
|
||||
*/
|
||||
int32_t APS256XX_Read(XSPI_HandleTypeDef *Ctx, uint8_t *pData, uint32_t ReadAddr, uint32_t Size, uint32_t LatencyCode,
|
||||
uint32_t IOMode, uint32_t BurstType)
|
||||
{
|
||||
XSPI_RegularCmdTypeDef sCommand = {0};
|
||||
|
||||
/* Initialize the read command */
|
||||
sCommand.OperationType = HAL_XSPI_OPTYPE_COMMON_CFG;
|
||||
sCommand.InstructionMode = HAL_XSPI_INSTRUCTION_8_LINES;
|
||||
sCommand.InstructionWidth = HAL_XSPI_INSTRUCTION_8_BITS;
|
||||
sCommand.InstructionDTRMode = HAL_XSPI_INSTRUCTION_DTR_DISABLE;
|
||||
sCommand.Instruction = ((BurstType == 0U) ? APS256XX_READ_LINEAR_BURST_CMD : APS256XX_READ_CMD);
|
||||
sCommand.AddressMode = HAL_XSPI_ADDRESS_8_LINES;
|
||||
sCommand.AddressWidth = HAL_XSPI_ADDRESS_32_BITS;
|
||||
sCommand.AddressDTRMode = HAL_XSPI_ADDRESS_DTR_ENABLE;
|
||||
sCommand.Address = ReadAddr;
|
||||
sCommand.AlternateBytesMode = HAL_XSPI_ALT_BYTES_NONE;
|
||||
sCommand.DataMode = ((IOMode == 0U) ? HAL_XSPI_DATA_8_LINES : HAL_XSPI_DATA_16_LINES);
|
||||
sCommand.DataDTRMode = HAL_XSPI_DATA_DTR_ENABLE;
|
||||
sCommand.DataLength = Size;
|
||||
sCommand.DummyCycles = (LatencyCode - 1U);
|
||||
sCommand.DQSMode = HAL_XSPI_DQS_ENABLE;
|
||||
#if defined (XSPI_CCR_SIOO)
|
||||
sCommand.SIOOMode = HAL_XSPI_SIOO_INST_EVERY_CMD;
|
||||
#endif
|
||||
/* Configure the command */
|
||||
if (HAL_XSPI_Command(Ctx, &sCommand, HAL_XSPI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
|
||||
{
|
||||
return APS256XX_ERROR;
|
||||
}
|
||||
|
||||
/* Reception of the data */
|
||||
if (HAL_XSPI_Receive(Ctx, pData, HAL_XSPI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
|
||||
{
|
||||
return APS256XX_ERROR;
|
||||
}
|
||||
|
||||
return APS256XX_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reads an amount of data in DMA mode from the memory.
|
||||
* @param Ctx Component object pointer
|
||||
* @param pData Pointer to data to be read
|
||||
* @param ReadAddr Read start address
|
||||
* @param Size Size of data to read
|
||||
* @param LatencyCode Latency used for the access
|
||||
* @param IOMode I/O Mode used for the access
|
||||
* @param BurstType Type of burst used for the access
|
||||
* @retval Memory status
|
||||
*/
|
||||
int32_t APS256XX_Read_DMA(XSPI_HandleTypeDef *Ctx, uint8_t *pData, uint32_t ReadAddr, uint32_t Size,
|
||||
uint32_t LatencyCode, uint32_t IOMode, uint32_t BurstType)
|
||||
{
|
||||
XSPI_RegularCmdTypeDef sCommand = {0};
|
||||
|
||||
/* Initialize the read command */
|
||||
sCommand.OperationType = HAL_XSPI_OPTYPE_COMMON_CFG;
|
||||
sCommand.InstructionMode = HAL_XSPI_INSTRUCTION_8_LINES;
|
||||
sCommand.InstructionWidth = HAL_XSPI_INSTRUCTION_8_BITS;
|
||||
sCommand.InstructionDTRMode = HAL_XSPI_INSTRUCTION_DTR_DISABLE;
|
||||
sCommand.Instruction = ((BurstType == 0U) ? APS256XX_READ_LINEAR_BURST_CMD : APS256XX_READ_CMD);
|
||||
sCommand.AddressMode = HAL_XSPI_ADDRESS_8_LINES;
|
||||
sCommand.AddressWidth = HAL_XSPI_ADDRESS_32_BITS;
|
||||
sCommand.AddressDTRMode = HAL_XSPI_ADDRESS_DTR_ENABLE;
|
||||
sCommand.Address = ReadAddr;
|
||||
sCommand.AlternateBytesMode = HAL_XSPI_ALT_BYTES_NONE;
|
||||
sCommand.DataMode = ((IOMode == 0U) ? HAL_XSPI_DATA_8_LINES : HAL_XSPI_DATA_16_LINES);
|
||||
sCommand.DataDTRMode = HAL_XSPI_DATA_DTR_ENABLE;
|
||||
sCommand.DataLength = Size;
|
||||
sCommand.DummyCycles = (LatencyCode - 1U);
|
||||
sCommand.DQSMode = HAL_XSPI_DQS_ENABLE;
|
||||
#if defined (XSPI_CCR_SIOO)
|
||||
sCommand.SIOOMode = HAL_XSPI_SIOO_INST_EVERY_CMD;
|
||||
#endif
|
||||
|
||||
/* Configure the command */
|
||||
if (HAL_XSPI_Command(Ctx, &sCommand, HAL_XSPI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
|
||||
{
|
||||
return APS256XX_ERROR;
|
||||
}
|
||||
|
||||
/* Reception of the data */
|
||||
if (HAL_XSPI_Receive_DMA(Ctx, pData) != HAL_OK)
|
||||
{
|
||||
return APS256XX_ERROR;
|
||||
}
|
||||
|
||||
return APS256XX_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Writes an amount of data to the memory.
|
||||
* @param Ctx Component object pointer
|
||||
* @param pData Pointer to data to be written
|
||||
* @param WriteAddr Write start address
|
||||
* @param Size Size of data to write
|
||||
* @param LatencyCode Latency used for the access
|
||||
* @param IOMode I/O Mode used for the access
|
||||
* @param BurstType Type of burst used for the access
|
||||
* @retval Memory status
|
||||
*/
|
||||
int32_t APS256XX_Write(XSPI_HandleTypeDef *Ctx, uint8_t *pData, uint32_t WriteAddr, uint32_t Size, uint32_t LatencyCode,
|
||||
uint32_t IOMode, uint32_t BurstType)
|
||||
{
|
||||
XSPI_RegularCmdTypeDef sCommand = {0};
|
||||
|
||||
/* Initialize the write command */
|
||||
sCommand.OperationType = HAL_XSPI_OPTYPE_COMMON_CFG;
|
||||
sCommand.InstructionMode = HAL_XSPI_INSTRUCTION_8_LINES;
|
||||
sCommand.InstructionWidth = HAL_XSPI_INSTRUCTION_8_BITS;
|
||||
sCommand.InstructionDTRMode = HAL_XSPI_INSTRUCTION_DTR_DISABLE;
|
||||
sCommand.Instruction = ((BurstType == 0U) ? APS256XX_WRITE_LINEAR_BURST_CMD : APS256XX_WRITE_CMD);
|
||||
sCommand.AddressMode = HAL_XSPI_ADDRESS_8_LINES;
|
||||
sCommand.AddressWidth = HAL_XSPI_ADDRESS_32_BITS;
|
||||
sCommand.AddressDTRMode = HAL_XSPI_ADDRESS_DTR_ENABLE;
|
||||
sCommand.Address = WriteAddr;
|
||||
sCommand.AlternateBytesMode = HAL_XSPI_ALT_BYTES_NONE;
|
||||
sCommand.DataMode = ((IOMode == 0U) ? HAL_XSPI_DATA_8_LINES : HAL_XSPI_DATA_16_LINES);
|
||||
sCommand.DataDTRMode = HAL_XSPI_DATA_DTR_ENABLE;
|
||||
sCommand.DataLength = Size;
|
||||
sCommand.DummyCycles = (LatencyCode - 1U);
|
||||
sCommand.DQSMode = HAL_XSPI_DQS_ENABLE;
|
||||
#if defined (XSPI_CCR_SIOO)
|
||||
sCommand.SIOOMode = HAL_XSPI_SIOO_INST_EVERY_CMD;
|
||||
#endif
|
||||
|
||||
/* Configure the command */
|
||||
if (HAL_XSPI_Command(Ctx, &sCommand, HAL_XSPI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
|
||||
{
|
||||
return APS256XX_ERROR;
|
||||
}
|
||||
|
||||
/* Transmission of the data */
|
||||
if (HAL_XSPI_Transmit(Ctx, pData, HAL_XSPI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
|
||||
{
|
||||
return APS256XX_ERROR;
|
||||
}
|
||||
|
||||
return APS256XX_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Writes an amount of data in DMA mode to the memory.
|
||||
* @param Ctx Component object pointer
|
||||
* @param pData Pointer to data to be written
|
||||
* @param WriteAddr Write start address
|
||||
* @param Size Size of data to write
|
||||
* @param LatencyCode Latency used for the access
|
||||
* @param IOMode I/O Mode used for the access
|
||||
* @param BurstType Type of burst used for the access
|
||||
* @retval Memory status
|
||||
*/
|
||||
int32_t APS256XX_Write_DMA(XSPI_HandleTypeDef *Ctx, uint8_t *pData, uint32_t WriteAddr, uint32_t Size,
|
||||
uint32_t LatencyCode, uint32_t IOMode, uint32_t BurstType)
|
||||
{
|
||||
XSPI_RegularCmdTypeDef sCommand = {0};
|
||||
|
||||
/* Initialize the write command */
|
||||
sCommand.OperationType = HAL_XSPI_OPTYPE_COMMON_CFG;
|
||||
sCommand.InstructionMode = HAL_XSPI_INSTRUCTION_8_LINES;
|
||||
sCommand.InstructionWidth = HAL_XSPI_INSTRUCTION_8_BITS;
|
||||
sCommand.InstructionDTRMode = HAL_XSPI_INSTRUCTION_DTR_DISABLE;
|
||||
sCommand.Instruction = ((BurstType == 0U) ? APS256XX_WRITE_LINEAR_BURST_CMD : APS256XX_WRITE_CMD);
|
||||
sCommand.AddressMode = HAL_XSPI_ADDRESS_8_LINES;
|
||||
sCommand.AddressWidth = HAL_XSPI_ADDRESS_32_BITS;
|
||||
sCommand.AddressDTRMode = HAL_XSPI_ADDRESS_DTR_ENABLE;
|
||||
sCommand.Address = WriteAddr;
|
||||
sCommand.AlternateBytesMode = HAL_XSPI_ALT_BYTES_NONE;
|
||||
sCommand.DataMode = ((IOMode == 0U) ? HAL_XSPI_DATA_8_LINES : HAL_XSPI_DATA_16_LINES);
|
||||
sCommand.DataDTRMode = HAL_XSPI_DATA_DTR_ENABLE;
|
||||
sCommand.DataLength = Size;
|
||||
sCommand.DummyCycles = (LatencyCode - 1U);
|
||||
sCommand.DQSMode = HAL_XSPI_DQS_ENABLE;
|
||||
#if defined (XSPI_CCR_SIOO)
|
||||
sCommand.SIOOMode = HAL_XSPI_SIOO_INST_EVERY_CMD;
|
||||
#endif
|
||||
|
||||
/* Configure the command */
|
||||
if (HAL_XSPI_Command(Ctx, &sCommand, HAL_XSPI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
|
||||
{
|
||||
return APS256XX_ERROR;
|
||||
}
|
||||
|
||||
/* Transmission of the data */
|
||||
if (HAL_XSPI_Transmit_DMA(Ctx, pData) != HAL_OK)
|
||||
{
|
||||
return APS256XX_ERROR;
|
||||
}
|
||||
|
||||
return APS256XX_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable memory mapped mode for the memory.
|
||||
* @param Ctx Component object pointer
|
||||
* @param ReadLatencyCode Latency used for the read access
|
||||
* @param WriteLatencyCode Latency used for the write access
|
||||
* @param IOMode I/O Mode used for the access
|
||||
* @param BurstType Type of burst used for the access
|
||||
* @retval Memory status
|
||||
*/
|
||||
int32_t APS256XX_EnableMemoryMappedMode(XSPI_HandleTypeDef *Ctx, uint32_t ReadLatencyCode, uint32_t WriteLatencyCode,
|
||||
uint32_t IOMode, uint32_t BurstType)
|
||||
{
|
||||
XSPI_RegularCmdTypeDef sCommand = {0};
|
||||
XSPI_MemoryMappedTypeDef sMemMappedCfg = {0};
|
||||
|
||||
/* Initialize the write command */
|
||||
sCommand.OperationType = HAL_XSPI_OPTYPE_WRITE_CFG;
|
||||
sCommand.InstructionMode = HAL_XSPI_INSTRUCTION_8_LINES;
|
||||
sCommand.InstructionWidth = HAL_XSPI_INSTRUCTION_8_BITS;
|
||||
sCommand.InstructionDTRMode = HAL_XSPI_INSTRUCTION_DTR_DISABLE;
|
||||
sCommand.Instruction = ((BurstType == 0U) ? APS256XX_WRITE_LINEAR_BURST_CMD : APS256XX_WRITE_CMD);
|
||||
sCommand.AddressMode = HAL_XSPI_ADDRESS_8_LINES;
|
||||
sCommand.AddressWidth = HAL_XSPI_ADDRESS_32_BITS;
|
||||
sCommand.AddressDTRMode = HAL_XSPI_ADDRESS_DTR_ENABLE;
|
||||
sCommand.AlternateBytesMode = HAL_XSPI_ALT_BYTES_NONE;
|
||||
sCommand.DataMode = ((IOMode == 0U) ? HAL_XSPI_DATA_8_LINES : HAL_XSPI_DATA_16_LINES);
|
||||
sCommand.DataDTRMode = HAL_XSPI_DATA_DTR_ENABLE;
|
||||
sCommand.DummyCycles = (WriteLatencyCode - 1U);
|
||||
sCommand.DQSMode = HAL_XSPI_DQS_ENABLE;
|
||||
#if defined (XSPI_CCR_SIOO)
|
||||
sCommand.SIOOMode = HAL_XSPI_SIOO_INST_EVERY_CMD;
|
||||
#endif
|
||||
|
||||
if (HAL_XSPI_Command(Ctx, &sCommand, HAL_XSPI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
|
||||
{
|
||||
return APS256XX_ERROR;
|
||||
}
|
||||
|
||||
/* Initialize the read command */
|
||||
sCommand.OperationType = HAL_XSPI_OPTYPE_READ_CFG;
|
||||
sCommand.Instruction = ((BurstType == 0U) ? APS256XX_READ_LINEAR_BURST_CMD : APS256XX_READ_CMD);
|
||||
sCommand.DummyCycles = (ReadLatencyCode - 1U);
|
||||
|
||||
if (HAL_XSPI_Command(Ctx, &sCommand, HAL_XSPI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
|
||||
{
|
||||
return APS256XX_ERROR;
|
||||
}
|
||||
|
||||
/* Activation of memory-mapped mode */
|
||||
sMemMappedCfg.TimeOutActivation = HAL_XSPI_TIMEOUT_COUNTER_DISABLE;
|
||||
|
||||
if (HAL_XSPI_MemoryMapped(Ctx, &sMemMappedCfg) != HAL_OK)
|
||||
{
|
||||
return APS256XX_ERROR;
|
||||
}
|
||||
|
||||
return APS256XX_OK;
|
||||
}
|
||||
|
||||
/* Register/Setting Commands **************************************************/
|
||||
/**
|
||||
* @brief Read mode register value
|
||||
* @param Ctx Component object pointer
|
||||
* @param Address Register address
|
||||
* @param Value Register value pointer
|
||||
* @param LatencyCode Latency used for the access
|
||||
* @retval error status
|
||||
*/
|
||||
int32_t APS256XX_ReadReg(XSPI_HandleTypeDef *Ctx, uint32_t Address, uint8_t *Value, uint32_t LatencyCode)
|
||||
{
|
||||
XSPI_RegularCmdTypeDef sCommand = {0};
|
||||
|
||||
/* Initialize the read register command */
|
||||
sCommand.OperationType = HAL_XSPI_OPTYPE_COMMON_CFG;
|
||||
sCommand.InstructionMode = HAL_XSPI_INSTRUCTION_8_LINES;
|
||||
sCommand.InstructionWidth = HAL_XSPI_INSTRUCTION_8_BITS;
|
||||
sCommand.InstructionDTRMode = HAL_XSPI_INSTRUCTION_DTR_DISABLE;
|
||||
sCommand.Instruction = APS256XX_READ_REG_CMD;
|
||||
sCommand.AddressMode = HAL_XSPI_ADDRESS_8_LINES;
|
||||
sCommand.AddressWidth = HAL_XSPI_ADDRESS_32_BITS;
|
||||
sCommand.AddressDTRMode = HAL_XSPI_ADDRESS_DTR_ENABLE;
|
||||
sCommand.Address = Address;
|
||||
sCommand.AlternateBytesMode = HAL_XSPI_ALT_BYTES_NONE;
|
||||
sCommand.DataMode = HAL_XSPI_DATA_8_LINES;
|
||||
sCommand.DataDTRMode = HAL_XSPI_DATA_DTR_ENABLE;
|
||||
sCommand.DataLength = 2;
|
||||
sCommand.DummyCycles = (LatencyCode - 1U);
|
||||
sCommand.DQSMode = HAL_XSPI_DQS_ENABLE;
|
||||
#if defined (XSPI_CCR_SIOO)
|
||||
sCommand.SIOOMode = HAL_XSPI_SIOO_INST_EVERY_CMD;
|
||||
#endif
|
||||
|
||||
/* Configure the command */
|
||||
if (HAL_XSPI_Command(Ctx, &sCommand, HAL_XSPI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
|
||||
{
|
||||
return APS256XX_ERROR;
|
||||
}
|
||||
|
||||
/* Reception of the data */
|
||||
if (HAL_XSPI_Receive(Ctx, (uint8_t *)Value, HAL_XSPI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
|
||||
{
|
||||
return APS256XX_ERROR;
|
||||
}
|
||||
|
||||
return APS256XX_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Write mode register
|
||||
* @param Ctx Component object pointer
|
||||
* @param Address Register address
|
||||
* @param Value Value to write to register
|
||||
* @retval error status
|
||||
*/
|
||||
int32_t APS256XX_WriteReg(XSPI_HandleTypeDef *Ctx, uint32_t Address, uint8_t Value)
|
||||
{
|
||||
XSPI_RegularCmdTypeDef sCommand = {0};
|
||||
|
||||
/* Initialize the write register command */
|
||||
sCommand.OperationType = HAL_XSPI_OPTYPE_COMMON_CFG;
|
||||
sCommand.InstructionMode = HAL_XSPI_INSTRUCTION_8_LINES;
|
||||
sCommand.InstructionWidth = HAL_XSPI_INSTRUCTION_8_BITS;
|
||||
sCommand.InstructionDTRMode = HAL_XSPI_INSTRUCTION_DTR_DISABLE;
|
||||
sCommand.Instruction = APS256XX_WRITE_REG_CMD;
|
||||
sCommand.AddressMode = HAL_XSPI_ADDRESS_8_LINES;
|
||||
sCommand.AddressWidth = HAL_XSPI_ADDRESS_32_BITS;
|
||||
sCommand.AddressDTRMode = HAL_XSPI_ADDRESS_DTR_ENABLE;
|
||||
sCommand.Address = Address;
|
||||
sCommand.AlternateBytesMode = HAL_XSPI_ALT_BYTES_NONE;
|
||||
sCommand.DataMode = HAL_XSPI_DATA_8_LINES;
|
||||
sCommand.DataDTRMode = HAL_XSPI_DATA_DTR_ENABLE;
|
||||
sCommand.DataLength = 2;
|
||||
sCommand.DummyCycles = 0;
|
||||
sCommand.DQSMode = HAL_XSPI_DQS_DISABLE;
|
||||
#if defined (XSPI_CCR_SIOO)
|
||||
sCommand.SIOOMode = HAL_XSPI_SIOO_INST_EVERY_CMD;
|
||||
#endif
|
||||
|
||||
/* Configure the command */
|
||||
if (HAL_XSPI_Command(Ctx, &sCommand, HAL_XSPI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
|
||||
{
|
||||
return APS256XX_ERROR;
|
||||
}
|
||||
|
||||
/* Transmission of the data */
|
||||
if (HAL_XSPI_Transmit(Ctx, (uint8_t *)(&Value), HAL_XSPI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
|
||||
{
|
||||
return APS256XX_ERROR;
|
||||
}
|
||||
|
||||
return APS256XX_OK;
|
||||
}
|
||||
|
||||
/* ID Commands ****************************************************************/
|
||||
/**
|
||||
* @brief Read Flash IDs.
|
||||
* Vendor ID, Device ID, Device Density
|
||||
* @param Ctx Component object pointer
|
||||
* @param ID IDs pointer (2 * 8-bits value)
|
||||
* @param LatencyCode Latency used for the access
|
||||
* @retval error status
|
||||
*/
|
||||
int32_t APS256XX_ReadID(XSPI_HandleTypeDef *Ctx, uint8_t *ID, uint32_t LatencyCode)
|
||||
{
|
||||
/* Read the Mode Register 1 and 2 */
|
||||
if (APS256XX_ReadReg(Ctx, APS256XX_MR1_ADDRESS, ID, LatencyCode) != APS256XX_OK)
|
||||
{
|
||||
return APS256XX_ERROR;
|
||||
}
|
||||
|
||||
/* Keep only Vendor ID from Mode Register 1 */
|
||||
*ID &= (APS256XX_MR1_VENDOR_ID);
|
||||
|
||||
/* Keep only Device ID and Device Density from Mode Register 2 */
|
||||
*(ID + 1) &= (APS256XX_MR2_DEVICE_ID | APS256XX_MR2_DENSITY);
|
||||
|
||||
return APS256XX_OK;
|
||||
}
|
||||
|
||||
/* Power down Commands ********************************************************/
|
||||
/**
|
||||
* @brief Memory enter deep power-down command
|
||||
* @param Ctx Component object pointer
|
||||
* @retval error status
|
||||
*/
|
||||
int32_t APS256XX_EnterPowerDown(XSPI_HandleTypeDef *Ctx)
|
||||
{
|
||||
/* Update the deep power down value of the MR6 register */
|
||||
if (APS256XX_WriteReg(Ctx, APS256XX_MR6_ADDRESS, APS256XX_MR6_HS_HALF_SPEED_MODE) != APS256XX_OK)
|
||||
{
|
||||
return APS256XX_ERROR;
|
||||
}
|
||||
|
||||
/* --- Memory enter deep power down as soon nCS goes high --- */
|
||||
/* --- At least 500us should be respected before leaving deep power down --- */
|
||||
|
||||
return APS256XX_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Flash leave deep power-down command
|
||||
* @param Ctx Component object pointer
|
||||
* @param LatencyCode Latency used for the access
|
||||
* @retval error status
|
||||
*/
|
||||
int32_t APS256XX_LeavePowerDown(XSPI_HandleTypeDef *Ctx)
|
||||
{
|
||||
/* --- A dummy command is sent to the memory, as the nCS should be low for at least 60 ns --- */
|
||||
/* --- Memory takes 150us max to leave deep power down --- */
|
||||
|
||||
XSPI_RegularCmdTypeDef sCommand = {0};
|
||||
|
||||
/* Initialize the command */
|
||||
sCommand.OperationType = HAL_XSPI_OPTYPE_COMMON_CFG;
|
||||
sCommand.InstructionMode = HAL_XSPI_INSTRUCTION_8_LINES;
|
||||
sCommand.InstructionWidth = HAL_XSPI_INSTRUCTION_8_BITS;
|
||||
sCommand.InstructionDTRMode = HAL_XSPI_INSTRUCTION_DTR_DISABLE;
|
||||
sCommand.Instruction = APS256XX_READ_CMD;
|
||||
sCommand.AddressMode = HAL_XSPI_ADDRESS_8_LINES;
|
||||
sCommand.AddressWidth = HAL_XSPI_ADDRESS_32_BITS;
|
||||
sCommand.AddressDTRMode = HAL_XSPI_ADDRESS_DTR_DISABLE;
|
||||
sCommand.Address = 0;
|
||||
sCommand.AlternateBytesMode = HAL_XSPI_ALT_BYTES_NONE;
|
||||
sCommand.DataMode = HAL_XSPI_DATA_NONE;
|
||||
sCommand.DataLength = 0;
|
||||
sCommand.DummyCycles = 0;
|
||||
sCommand.DQSMode = HAL_XSPI_DQS_DISABLE;
|
||||
#if defined (XSPI_CCR_SIOO)
|
||||
sCommand.SIOOMode = HAL_XSPI_SIOO_INST_EVERY_CMD;
|
||||
#endif
|
||||
|
||||
/* Configure the command */
|
||||
if (HAL_XSPI_Command(Ctx, &sCommand, HAL_XSPI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
|
||||
{
|
||||
return APS256XX_ERROR;
|
||||
}
|
||||
|
||||
return APS256XX_OK;
|
||||
}
|
||||
|
||||
/* Reset Command **************************************************************/
|
||||
/**
|
||||
* @brief Reset the memory
|
||||
* @param Ctx Component object pointer
|
||||
* @retval error status
|
||||
*/
|
||||
int32_t APS256XX_Reset(XSPI_HandleTypeDef *Ctx)
|
||||
{
|
||||
XSPI_RegularCmdTypeDef sCommand = {0};
|
||||
|
||||
/* Initialize the command */
|
||||
sCommand.OperationType = HAL_XSPI_OPTYPE_COMMON_CFG;
|
||||
sCommand.InstructionMode = HAL_XSPI_INSTRUCTION_8_LINES;
|
||||
sCommand.InstructionWidth = HAL_XSPI_INSTRUCTION_8_BITS;
|
||||
sCommand.InstructionDTRMode = HAL_XSPI_INSTRUCTION_DTR_DISABLE;
|
||||
sCommand.Instruction = APS256XX_RESET_CMD;
|
||||
sCommand.AddressMode = HAL_XSPI_ADDRESS_8_LINES;
|
||||
sCommand.AddressWidth = HAL_XSPI_ADDRESS_24_BITS;
|
||||
sCommand.AddressDTRMode = HAL_XSPI_ADDRESS_DTR_DISABLE;
|
||||
sCommand.Address = 0;
|
||||
sCommand.AlternateBytesMode = HAL_XSPI_ALT_BYTES_NONE;
|
||||
sCommand.DataMode = HAL_XSPI_DATA_NONE;
|
||||
sCommand.DataLength = 0;
|
||||
sCommand.DummyCycles = 0;
|
||||
sCommand.DQSMode = HAL_XSPI_DQS_DISABLE;
|
||||
#if defined (XSPI_CCR_SIOO)
|
||||
sCommand.SIOOMode = HAL_XSPI_SIOO_INST_EVERY_CMD;
|
||||
#endif
|
||||
|
||||
/* Configure the command */
|
||||
if (HAL_XSPI_Command(Ctx, &sCommand, HAL_XSPI_TIMEOUT_DEFAULT_VALUE) != HAL_OK)
|
||||
{
|
||||
return APS256XX_ERROR;
|
||||
}
|
||||
|
||||
/* Need to wait tRST */
|
||||
HAL_Delay(1);
|
||||
return 0/*APS256XX_OK*/;
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@@ -0,0 +1,287 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file aps256xx.h
|
||||
* @author MCD Application Team
|
||||
* @brief This file contains all the description of the APS256XX 16bits-HSPI PSRAM memory.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 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 APS256XX_H
|
||||
#define APS256XX_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "aps256xx_conf.h"
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Components
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup APS256XX
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup APS256XX_Exported_Types
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup APS256XX_Exported_Constants
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief APS256XX Configuration
|
||||
*/
|
||||
#define APS256XX_RAM_SIZE 0x2000000U /* 256 MBits => 32 MBytes */
|
||||
|
||||
/**
|
||||
* @brief APS256XX Error codes
|
||||
*/
|
||||
#define APS256XX_OK (0)
|
||||
#define APS256XX_ERROR (-1)
|
||||
|
||||
/******************************************************************************
|
||||
* @brief APS256XX Registers
|
||||
****************************************************************************/
|
||||
/* Mode Register 0 */
|
||||
#define APS256XX_MR0_ADDRESS 0x00000000U
|
||||
|
||||
#define APS256XX_MR0_DRIVE_STRENGTH 0x03U /*!< Drive Strength */
|
||||
#define APS256XX_MR0_DS_FULL 0x00U /*!< Drive Strength : Full (25 Ohm) */
|
||||
#define APS256XX_MR0_DS_HALF 0x01U /*!< Drive Strength : Half (50 Ohm) */
|
||||
#define APS256XX_MR0_DS_QUART 0x02U /*!< Drive Strength : 1/4 (100 Ohm) */
|
||||
#define APS256XX_MR0_DS_EIGHT 0x03U /*!< Drive Strength : 1/8 (200 Ohm) */
|
||||
|
||||
#define APS256XX_MR0_READ_LATENCY_CODE 0x1CU /*!< Read Latency Code */
|
||||
#define APS256XX_MR0_RLC_3 0x00U /*!< Read Latency Code : 3 */
|
||||
#define APS256XX_MR0_RLC_4 0x04U /*!< Read Latency Code : 4 */
|
||||
#define APS256XX_MR0_RLC_5 0x08U /*!< Read Latency Code : 5 */
|
||||
#define APS256XX_MR0_RLC_6 0x0CU /*!< Read Latency Code : 6 */
|
||||
#define APS256XX_MR0_RLC_7 0x10U /*!< Read Latency Code : 7 */
|
||||
|
||||
#define APS256XX_MR0_LATENCY_TYPE 0x20U /*!< Latency Type */
|
||||
|
||||
/* Mode Register 1 */
|
||||
#define APS256XX_MR1_ADDRESS 0x00000001U
|
||||
|
||||
#define APS256XX_MR1_VENDOR_ID 0x1FU /*!< Vendor Identifier */
|
||||
#define APS256XX_MR1_VENDOR_ID_APM 0x0DU /*!< Vendor Identifier : APM */
|
||||
|
||||
#define APS256XX_MR1_ULP 0x80U /*!< Ultra Low Power Device */
|
||||
|
||||
/* Mode Register 2 */
|
||||
#define APS256XX_MR2_ADDRESS 0x00000002U
|
||||
|
||||
#define APS256XX_MR2_DENSITY 0x07U /*!< Device Density */
|
||||
#define APS256XX_MR2_DENSITY_128_MB 0x05U /*!< Device Density : 128 Mb */
|
||||
#define APS256XX_MR2_DENSITY_256_MB 0x07U /*!< Device Density : 256 Mb */
|
||||
#define APS256XX_MR2_DENSITY_512_MB 0x06U /*!< Device Density : 512 Mb */
|
||||
|
||||
#define APS256XX_MR2_DEVICE_ID 0x18U /*!< Device Identifier */
|
||||
#define APS256XX_MR2_DEVID_GEN_1 0x00U /*!< Device Identifier : Generation 1 */
|
||||
#define APS256XX_MR2_DEVID_GEN_2 0x08U /*!< Device Identifier : Generation 2 */
|
||||
#define APS256XX_MR2_DEVID_GEN_3 0x10U /*!< Device Identifier : Generation 3 */
|
||||
#define APS256XX_MR2_DEVID_GEN_4 0x18U /*!< Device Identifier : Generation 4 */
|
||||
|
||||
#define APS256XX_MR2_KGD 0xE0U /*!< Good-Die Identifier */
|
||||
#define APS256XX_MR2_KGD_GOOD_DIE_ID 0xC0U /*!< Good-Die Identifier : PASS */
|
||||
|
||||
/* Mode Register 3 */
|
||||
#define APS256XX_MR3_ADDRESS 0x00000003U
|
||||
|
||||
#define APS256XX_MR3_SRF 0x30U /*!< Self Refresh Flag */
|
||||
#define APS256XX_MR3_SRF_0_5X 0x10U /*!< Self Refresh Flag : 0.5x Refresh */
|
||||
#define APS256XX_MR3_SRF_1X 0x00U /*!< Self Refresh Flag : 1x Refresh */
|
||||
#define APS256XX_MR3_SRF_4X 0x20U /*!< Self Refresh Flag : 4x Refresh */
|
||||
|
||||
#define APS256XX_MR3_RBXEN 0x80U /*!< Row Boundary Crossing Enable */
|
||||
|
||||
/* Mode Register 4 */
|
||||
#define APS256XX_MR4_ADDRESS 0x00000004U
|
||||
|
||||
#define APS256XX_MR4_PASR 0x07U /*!< Partially Address Space Refresh */
|
||||
#define APS256XX_MR4_PASR_FULL 0x00U /*!< PASR : Full Array */
|
||||
#define APS256XX_MR4_PASR_BOTTOM_HALF 0x01U /*!< PASR : Bottom 1/2 Array */
|
||||
#define APS256XX_MR4_PASR_BOTTOM_QUART 0x02U /*!< PASR : Bottom 1/4 Array */
|
||||
#define APS256XX_MR4_PASR_BOTTOM_EIGHT 0x03U /*!< PASR : Bottom 1/8 Array */
|
||||
#define APS256XX_MR4_PASR_NONE 0x04U /*!< PASR : None */
|
||||
#define APS256XX_MR4_PASR_TOP_HALF 0x05U /*!< PASR : Top 1/2 Array */
|
||||
#define APS256XX_MR4_PASR_TOP_QUART 0x06U /*!< PASR : Top 1/4 Array */
|
||||
#define APS256XX_MR4_PASR_TOP_EIGHT 0x07U /*!< PASR : Top 1/8 Array */
|
||||
|
||||
#define APS256XX_MR4_RF_RATE 0x18U /*!< Refresh Frequency Setting */
|
||||
#define APS256XX_MR4_RF_4X 0x00U /*!< RF : Always 4x Refresh */
|
||||
#define APS256XX_MR4_RF_1X 0x08U /*!< RF : Enables 1x Refresh */
|
||||
#define APS256XX_MR4_RF_0_5X 0x18U /*!< RF : Enables 0.5x Refresh */
|
||||
|
||||
#define APS256XX_MR4_WRITE_LATENCY_CODE 0xE0U /*!< Write Latency Code */
|
||||
#define APS256XX_MR4_WLC_3 0x00U /*!< Write Latency Code : 3 */
|
||||
#define APS256XX_MR4_WLC_4 0x80U /*!< Write Latency Code : 4 */
|
||||
#define APS256XX_MR4_WLC_5 0x40U /*!< Write Latency Code : 5 */
|
||||
#define APS256XX_MR4_WLC_6 0xC0U /*!< Write Latency Code : 6 */
|
||||
#define APS256XX_MR4_WLC_7 0x20U /*!< Write Latency Code : 7 */
|
||||
|
||||
/* Mode Register 6 */
|
||||
#define APS256XX_MR6_ADDRESS 0x00000006U
|
||||
|
||||
#define APS256XX_MR6_HALF_SLEEP 0xF0U /*!< Half Sleep */
|
||||
#define APS256XX_MR6_HS_HALF_SPEED_MODE 0xF0U /*!< Half Sleep : Half Speed Mode */
|
||||
#define APS256XX_MR6_HS_DEEP_POWER_DOWN 0xC0U /*!< Half Sleep : Deep Power Down Mode */
|
||||
|
||||
/* Mode Register 8 */
|
||||
#define APS256XX_MR8_ADDRESS 0x00000008U
|
||||
|
||||
#define APS256XX_MR8_BL 0x03U /*!< Burst Length */
|
||||
#define APS256XX_MR8_BL_16_BYTES 0x00U /*!< Burst Length : 16 Byte/Word Wrap */
|
||||
#define APS256XX_MR8_BL_32_BYTES 0x01U /*!< Burst Length : 32 Byte/Word Wrap */
|
||||
#define APS256XX_MR8_BL_64_BYTES 0x02U /*!< Burst Length : 64 Byte/Word Wrap */
|
||||
#define APS256XX_MR8_BL_2K_BYTES 0x03U /*!< Burst Length : 2K Byte/1K Word Wrap */
|
||||
|
||||
#define APS256XX_MR8_BT 0x04U /*!< Burst Type */
|
||||
|
||||
#define APS256XX_MR8_RBX 0x08U /*!< Row Boundary Crossing Read Enable */
|
||||
|
||||
#define APS256XX_MR8_X8_X16 0x40U /*!< IO X8/X16 Mode */
|
||||
|
||||
/******************************************************************************
|
||||
* @brief APS256XX Commands
|
||||
****************************************************************************/
|
||||
/* Read Operations */
|
||||
#define APS256XX_READ_CMD 0x00U /*!< Synchronous Read */
|
||||
#define APS256XX_READ_LINEAR_BURST_CMD 0x20U /*!< Linear Burst Read */
|
||||
|
||||
/* Write Operations */
|
||||
#define APS256XX_WRITE_CMD 0x80U /*!< Synchronous Write */
|
||||
#define APS256XX_WRITE_LINEAR_BURST_CMD 0xA0U /*!< Linear Burst Write */
|
||||
|
||||
/* Reset Operations */
|
||||
#define APS256XX_RESET_CMD 0xFFU /*!< Global Reset */
|
||||
|
||||
/* Register Operations */
|
||||
#define APS256XX_READ_REG_CMD 0x40U /*!< Mode Register Read */
|
||||
#define APS256XX_WRITE_REG_CMD 0xC0U /*!< Mode Register Write */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
/** @defgroup APS256XX_Exported_Types APS256XX Exported Types
|
||||
* @{
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
APS256XX_BURST_16_BYTES = APS256XX_MR8_BL_16_BYTES,
|
||||
APS256XX_BURST_32_BYTES = APS256XX_MR8_BL_32_BYTES,
|
||||
APS256XX_BURST_64_BYTES = APS256XX_MR8_BL_64_BYTES,
|
||||
APS256XX_BURST_2_KBYTES = APS256XX_MR8_BL_2K_BYTES
|
||||
} APS256XX_BurstLength_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
APS256XX_READ_LATENCY_3 = APS256XX_MR0_RLC_3,
|
||||
APS256XX_READ_LATENCY_4 = APS256XX_MR0_RLC_4,
|
||||
APS256XX_READ_LATENCY_5 = APS256XX_MR0_RLC_5,
|
||||
APS256XX_READ_LATENCY_6 = APS256XX_MR0_RLC_6,
|
||||
APS256XX_READ_LATENCY_7 = APS256XX_MR0_RLC_7
|
||||
} APS256XX_ReadLatencyCode_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
APS256XX_WRITE_LATENCY_3 = APS256XX_MR4_WLC_3,
|
||||
APS256XX_WRITE_LATENCY_4 = APS256XX_MR4_WLC_4,
|
||||
APS256XX_WRITE_LATENCY_5 = APS256XX_MR4_WLC_5,
|
||||
APS256XX_WRITE_LATENCY_6 = APS256XX_MR4_WLC_6,
|
||||
APS256XX_WRITE_LATENCY_7 = APS256XX_MR4_WLC_7
|
||||
} APS256XX_WriteLatencyCode_t;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup APS256XX_Exported_Macros APS256XX Exported Macros
|
||||
* @{
|
||||
*/
|
||||
#define APS256XX_READ_REG_LATENCY(rlc) ((((rlc) & APS256XX_MR0_READ_LATENCY_CODE) >> 2U) + 3U)
|
||||
|
||||
#define APS256XX_READ_LATENCY(rlc, type) ((((type) & APS256XX_MR0_LATENCY_TYPE) == 0U) ? \
|
||||
((((rlc) & APS256XX_MR0_READ_LATENCY_CODE) >> 2U) + 3U) : \
|
||||
(((((rlc) & APS256XX_MR0_READ_LATENCY_CODE) >> 2U) + 3U)*2U))
|
||||
|
||||
#define APS256XX_WRITE_LATENCY(wlc) ((((wlc) & APS256XX_MR4_WRITE_LATENCY_CODE) == 0U) ? 3U : \
|
||||
((((wlc) & APS256XX_MR4_WLC_7) != 0U) ? 7U : \
|
||||
((((wlc) & APS256XX_MR4_WLC_5) == 0U) ? 4U : \
|
||||
((((wlc) & APS256XX_MR4_WLC_4) == 0U) ? 5U : 6U))))
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup APS256XX_Exported_Functions APS256XX Exported Functions
|
||||
* @{
|
||||
*/
|
||||
/* Read/Write Array Commands **************************************************/
|
||||
int32_t APS256XX_Read(XSPI_HandleTypeDef *Ctx, uint8_t *pData, uint32_t ReadAddr, uint32_t Size, uint32_t LatencyCode,
|
||||
uint32_t IOMode, uint32_t BurstType);
|
||||
int32_t APS256XX_Read_DMA(XSPI_HandleTypeDef *Ctx, uint8_t *pData, uint32_t ReadAddr, uint32_t Size,
|
||||
uint32_t LatencyCode, uint32_t IOMode, uint32_t BurstType);
|
||||
int32_t APS256XX_Write(XSPI_HandleTypeDef *Ctx, uint8_t *pData, uint32_t WriteAddr, uint32_t Size, uint32_t LatencyCode,
|
||||
uint32_t IOMode, uint32_t BurstType);
|
||||
int32_t APS256XX_Write_DMA(XSPI_HandleTypeDef *Ctx, uint8_t *pData, uint32_t WriteAddr, uint32_t Size,
|
||||
uint32_t LatencyCode, uint32_t IOMode, uint32_t BurstType);
|
||||
int32_t APS256XX_EnableMemoryMappedMode(XSPI_HandleTypeDef *Ctx, uint32_t ReadLatencyCode, uint32_t WriteLatencyCode,
|
||||
uint32_t IOMode, uint32_t BurstType);
|
||||
|
||||
/* Register/Setting Commands **************************************************/
|
||||
int32_t APS256XX_ReadReg(XSPI_HandleTypeDef *Ctx, uint32_t Address, uint8_t *Value, uint32_t LatencyCode);
|
||||
int32_t APS256XX_WriteReg(XSPI_HandleTypeDef *Ctx, uint32_t Address, uint8_t Value);
|
||||
|
||||
/* ID Commands ****************************************************************/
|
||||
int32_t APS256XX_ReadID(XSPI_HandleTypeDef *Ctx, uint8_t *ID, uint32_t LatencyCode);
|
||||
|
||||
/* Power down Commands ********************************************************/
|
||||
int32_t APS256XX_EnterPowerDown(XSPI_HandleTypeDef *Ctx);
|
||||
int32_t APS256XX_LeavePowerDown(XSPI_HandleTypeDef *Ctx);
|
||||
|
||||
/* Reset Command **************************************************************/
|
||||
int32_t APS256XX_Reset(XSPI_HandleTypeDef *Ctx);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* APS256XX_H */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file aps256xx_conf.h
|
||||
* @author MCD Application Team
|
||||
* @brief APS256XX 16bits-OSPI PSRAM memory configuration template file.
|
||||
* This file should be copied to the application folder and renamed
|
||||
* to aps256xx_conf.h
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 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 APS256XX_CONF_H
|
||||
#define APS256XX_CONF_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32xxxx_hal.h"
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
#define CONF_HSPI_DS APS256XX_MR0_DS_HALF
|
||||
#define CONF_HSPI_PASR APS256XX_MR4_PASR_FULL
|
||||
#define CONF_HSPI_RF APS256XX_MR4_RF_4X
|
||||
|
||||
#define DEFAULT_READ_LATENCY_CODE APS256XX_READ_LATENCY_5
|
||||
#define DEFAULT_WRITE_LATENCY_CODE APS256XX_WRITE_LATENCY_5
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* APS256XX_CONF_H */
|
||||
@@ -0,0 +1,27 @@
|
||||
Copyright 2023 STMicroelectronics.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation and/or
|
||||
other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,6 @@
|
||||
This software component is provided to you as part of a software package and
|
||||
applicable license terms are in the Package_license file. If you received this
|
||||
software component outside of a package or without applicable license terms,
|
||||
the terms of the BSD-3-Clause license shall apply.
|
||||
You may obtain a copy of the BSD-3-Clause at:
|
||||
https://opensource.org/licenses/BSD-3-Clause
|
||||
@@ -0,0 +1,61 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
<title>Release Notes for MX66UW1G45G OCTOSPI Component Driver</title>
|
||||
<style type="text/css">
|
||||
code{white-space: pre-wrap;}
|
||||
span.smallcaps{font-variant: small-caps;}
|
||||
span.underline{text-decoration: underline;}
|
||||
div.column{display: inline-block; vertical-align: top; width: 50%;}
|
||||
</style>
|
||||
<link rel="stylesheet" href="_htmresc/mini-st_2020.css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<link rel="icon" type="image/x-icon" href="_htmresc/favicon.png" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-lg-4">
|
||||
<center>
|
||||
<h1 id="release-notes-for-mx66uw1g45g-component-driver">Release Notes for <mark>MX66UW1G45G</mark> Component Driver</h1>
|
||||
<p>Copyright © 2023 STMicroelectronics<br />
|
||||
</p>
|
||||
<a href="https://www.st.com" class="logo"><img src="_htmresc/st_logo_2020.png" alt="ST logo" /></a>
|
||||
</center>
|
||||
<h1 id="purpose">Purpose</h1>
|
||||
<p>This driver provides a set of functions offered by MX66UW1G45G OCTOSPI component</p>
|
||||
</div>
|
||||
<div class="col-sm-12 col-lg-8">
|
||||
<h1 id="update-history">Update History</h1>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section2" checked aria-hidden="true"> <label for="collapse-section2" aria-hidden="true"><strong>V1.1.0 / 08-December-2023</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes">Main Changes</h2>
|
||||
<ul>
|
||||
<li>Add implementation of release power-down command</li>
|
||||
<li>Correct DataLength in case of MX66UW1G45G_DTR_TRANSFER</li>
|
||||
</ul>
|
||||
<h2 id="section"></h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section1" aria-hidden="true"> <label for="collapse-section1" aria-hidden="true"><strong>V1.0.0 / 31-May-2023</strong></label>
|
||||
<div>
|
||||
<h2 id="main-changes-1">Main Changes</h2>
|
||||
<ul>
|
||||
<li>First official release of <strong>MX66UW1G45G</strong> octal SPI driver</li>
|
||||
</ul>
|
||||
<h2 id="section-1"></h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="sticky">
|
||||
For complete documentation on <mark>STM32 Microcontrollers</mark> , visit: <span style="font-color: blue;"><a href="http://www.st.com/STM32">www.st.com</a></span>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,58 @@
|
||||
---
|
||||
pagetitle: Release Notes for MX66UW1G45G OCTOSPI Component Driver
|
||||
lang: en
|
||||
header-includes: <link rel="icon" type="image/x-icon" href="_htmresc/favicon.png" />
|
||||
---
|
||||
::: {.row}
|
||||
::: {.col-sm-12 .col-lg-4}
|
||||
|
||||
<center>
|
||||
# Release Notes for <mark>MX66UW1G45G</mark> Component Driver
|
||||
Copyright © 2023 STMicroelectronics\
|
||||
|
||||
[](https://www.st.com){.logo}
|
||||
</center>
|
||||
|
||||
# Purpose
|
||||
|
||||
This driver provides a set of functions offered by MX66UW1G45G OCTOSPI component
|
||||
|
||||
:::
|
||||
|
||||
::: {.col-sm-12 .col-lg-8}
|
||||
# Update History
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section2" checked aria-hidden="true">
|
||||
<label for="collapse-section2" aria-hidden="true">__V1.1.0 / 08-December-2023__</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
- Add implementation of release power-down command
|
||||
- Correct DataLength in case of MX66UW1G45G_DTR_TRANSFER
|
||||
|
||||
##
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section1" aria-hidden="true">
|
||||
<label for="collapse-section1" aria-hidden="true">__V1.0.0 / 31-May-2023__</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
- First official release of **MX66UW1G45G** octal SPI driver
|
||||
|
||||
##
|
||||
</div>
|
||||
:::
|
||||
|
||||
:::
|
||||
:::
|
||||
|
||||
<footer class="sticky">
|
||||
For complete documentation on <mark>STM32 Microcontrollers</mark> ,
|
||||
visit: [[www.st.com](http://www.st.com/STM32)]{style="font-color: blue;"}
|
||||
</footer>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><g fill="#13254a"><path d="M100 .212C44.868.212 0 44.889 0 99.788c0 55.132 44.868 100 100 100s100-44.868 100-100C200 44.889 155.132.212 100 .212zm0 181.164c-44.974 0-81.587-36.614-81.587-81.587 0-44.762 36.614-81.164 81.587-81.164 44.995 0 81.587 36.402 81.587 81.164 0 44.973-36.592 81.587-81.587 81.587z" style="fill: #e6007e;"/><path d="M141.1 88.127h-29.439V58.688c0-6.392-5.185-11.598-11.598-11.598-6.413 0-11.619 5.206-11.619 11.598v29.439H58.476c-6.392 0-11.598 5.185-11.598 11.598 0 6.413 5.206 11.619 11.598 11.619h29.968v29.968c0 6.392 5.206 11.598 11.619 11.598 6.413 0 11.598-5.206 11.598-11.598v-29.968H141.1c6.392 0 11.598-5.206 11.598-11.619 0-6.413-5.206-11.598-11.598-11.598z" style="fill: #e6007e;"/></g></svg>
|
||||
|
After Width: | Height: | Size: 832 B |
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><g fill="#03234b"><path d="M170.934 64.569l-.04-.055-29.049 40.038-.057.079h14.867a59.366 59.366 0 0 1-1.488 15.615c-1.158 5.318-3.807 13.448-9.848 21.977-2.766 4.118-6.375 7.726-9.208 10.408-3.426 2.857-7.461 6.095-12 8.376-8.121 4.568-17.881 7.138-28.225 7.432-10.907.248-20.201-2.61-26.072-5.052-8.283-3.479-14.111-7.807-16.85-10.078-1.254-.956-2.25-1.907-3.057-2.676a28.662 28.662 0 0 0-1.157-1.069 158.874 158.874 0 0 0-1.479-1.362l-4.435-3.956 3.569 4.81.183.243c.2.263.548.722 1.048 1.389.276.334.579.747.93 1.226l.008.01c.689.939 1.546 2.107 2.664 3.322 3 3.536 8.178 8.801 15.808 13.801 5.969 3.866 15.672 8.901 28.001 10.935a79.05 79.05 0 0 0 12.485.998c7.97 0 15.651-1.228 22.828-3.649 6.366-1.877 12.192-4.981 17.053-7.771 6.16-3.936 10.817-7.586 14.654-11.488 8.084-7.899 14.884-17.913 19.15-28.199 3.259-7.594 5.456-15.727 6.529-24.175l.055-.425.083-.641H200l-29.066-40.063zM58.159 99.232l-12.655.563c-.097-.881-.159-1.986-.227-3.474a59.184 59.184 0 0 1 1.446-16.56c1.157-5.316 3.804-13.444 9.848-21.977 2.168-3.228 5.009-6.44 9.208-10.415 3.41-2.849 7.432-6.08 12.005-8.375 8.114-4.568 17.87-7.138 28.213-7.432 10.9-.25 20.196 2.607 26.072 5.045 8.258 3.473 14.105 7.812 16.857 10.091 1.257.951 2.253 1.904 3.057 2.673l.017.016c.43.411.801.766 1.136 1.051.475.438.841.777 1.091 1.01l.138.128.248.229 4.04 3.613-3.165-4.456c-.058-.083-.312-.417-.73-.971l-.507-.67a28.922 28.922 0 0 1-.901-1.192l-.02-.027c-.69-.945-1.548-2.121-2.677-3.346-3.002-3.537-8.182-8.803-15.813-13.801-5.964-3.865-15.662-8.9-27.997-10.935-8.484-1.363-21.496-2.009-35.313 2.651-6.355 1.88-12.186 4.983-17.054 7.772-6.163 3.944-10.82 7.595-14.654 11.488-8.079 7.894-14.882 17.909-19.155 28.2-3.268 7.624-5.463 15.757-6.523 24.173-.436 3.281-.642 5.421-.664 6.926L0 101.831l30.683 38.727.042.053 27.38-41.298.054-.081z" style="fill: #e6007e;"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
@@ -0,0 +1,384 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file mx66uw1g45g.h
|
||||
* @modify MCD Application Team
|
||||
* @brief This file contains all the description of the
|
||||
* MX66UW1G45G XSPI memory.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2023 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 MX66UW1G45G_H
|
||||
#define MX66UW1G45G_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "mx66uw1g45g_conf.h"
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Components
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup MX66UW1G45G
|
||||
* @{
|
||||
*/
|
||||
/** @defgroup MX66UW1G45G_Exported_Constants MX66UW1G45G Exported Constants
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief MX66UW1G45G Size configuration
|
||||
*/
|
||||
#define MX66UW1G45G_BLOCK_64K (uint32_t)(64 * 1024) /* 1024 blocks of 64KBytes */
|
||||
#define MX66UW1G45G_BLOCK_4K (uint32_t)(4 * 1024) /* 16384 sectors of 4KBytes */
|
||||
|
||||
#define MX66UW1G45G_FLASH_SIZE (uint32_t)(1024*1024*1024/8) /* 1 Gbits => 128MBytes */
|
||||
#define MX66UW1G45G_PAGE_SIZE (uint32_t)256 /* 262144 pages of 256 Bytes */
|
||||
|
||||
/**
|
||||
* @brief MX66UW1G45G Timing configuration
|
||||
*/
|
||||
|
||||
#define MX66UW1G45G_BULK_ERASE_MAX_TIME 460000U
|
||||
#define MX66UW1G45G_BLOCK_ERASE_MAX_TIME 1000U
|
||||
#define MX66UW1G45G_BLOCK_4K_ERASE_MAX_TIME 400U
|
||||
#define MX66UW1G45G_WRITE_REG_MAX_TIME 40U
|
||||
|
||||
#define MX66UW1G45G_RESET_MAX_TIME 100U /* when SWreset during erase operation */
|
||||
|
||||
#define MX66UW1G45G_AUTOPOLLING_INTERVAL_TIME 0x10U
|
||||
|
||||
/**
|
||||
* @brief MX66UW1G45G Error codes
|
||||
*/
|
||||
#define MX66UW1G45G_OK (0)
|
||||
#define MX66UW1G45G_ERROR (-1)
|
||||
|
||||
/**
|
||||
* @brief re-definition of legacy memory mapped functions
|
||||
*/
|
||||
#define MX66UW1G45G_EnableMemoryMappedModeDTR MX66UW1G45G_EnableDTRMemoryMappedMode
|
||||
#define MX66UW1G45G_EnableMemoryMappedModeSTR MX66UW1G45G_EnableSTRMemoryMappedMode
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* @brief MX66UW1G45G Commands
|
||||
****************************************************************************/
|
||||
|
||||
/*******************************************************************/
|
||||
/********************************* SPI ****************************/
|
||||
/*******************************************************************/
|
||||
|
||||
/***** READ/WRITE MEMORY Operations with 3-Byte Address ****************************/
|
||||
#define MX66UW1G45G_READ_CMD 0x03U /*!< Normal Read 3 Byte Address */
|
||||
#define MX66UW1G45G_FAST_READ_CMD 0x0BU /*!< Fast Read 3 Byte Address */
|
||||
#define MX66UW1G45G_PAGE_PROG_CMD 0x02U /*!< Page Program 3 Byte Address */
|
||||
#define MX66UW1G45G_SECTOR_ERASE_4K_CMD 0x20U /*!< SubSector Erase 4KB 3 Byte Address */
|
||||
#define MX66UW1G45G_BLOCK_ERASE_64K_CMD 0xD8U /*!< Sector Erase 64KB 3 Byte Address */
|
||||
#define MX66UW1G45G_BULK_ERASE_CMD 0x60U /*!< Bulk Erase */
|
||||
|
||||
/***** READ/WRITE MEMORY Operations with 4-Byte Address ****************************/
|
||||
#define MX66UW1G45G_4_BYTE_ADDR_READ_CMD 0x13U /*!< Normal Read 4 Byte address */
|
||||
#define MX66UW1G45G_4_BYTE_ADDR_FAST_READ_CMD 0x0CU /*!< Fast Read 4 Byte address */
|
||||
#define MX66UW1G45G_4_BYTE_PAGE_PROG_CMD 0x12U /*!< Page Program 4 Byte Address */
|
||||
#define MX66UW1G45G_4_BYTE_SECTOR_ERASE_4K_CMD 0x21U /*!< SubSector Erase 4KB 4 Byte Address */
|
||||
#define MX66UW1G45G_4_BYTE_BLOCK_ERASE_64K_CMD 0xDCU /*!< Sector Erase 64KB 4 Byte Address */
|
||||
|
||||
/***** Setting commands ************************************************************/
|
||||
#define MX66UW1G45G_WRITE_ENABLE_CMD 0x06U /*!< Write Enable */
|
||||
#define MX66UW1G45G_WRITE_DISABLE_CMD 0x04U /*!< Write Disable */
|
||||
#define MX66UW1G45G_PROG_ERASE_SUSPEND_CMD 0xB0U /*!< Program/Erase suspend */
|
||||
#define MX66UW1G45G_PROG_ERASE_RESUME_CMD 0x30U /*!< Program/Erase resume */
|
||||
#define MX66UW1G45G_ENTER_DEEP_POWER_DOWN_CMD 0xB9U /*!< Enter deep power down */
|
||||
#define MX66UW1G45G_RELEASE_DEEP_POWER_DOWN_CMD 0xABU /*!< Release from deep power down */
|
||||
#define MX66UW1G45G_SET_BURST_LENGTH_CMD 0xC0U /*!< Set burst length */
|
||||
#define MX66UW1G45G_ENTER_SECURED_OTP_CMD 0xB1U /*!< Enter secured OTP) */
|
||||
#define MX66UW1G45G_EXIT_SECURED_OTP_CMD 0xC1U /*!< Exit secured OTP) */
|
||||
|
||||
/***** RESET commands ************************************************************/
|
||||
#define MX66UW1G45G_NOP_CMD 0x00U /*!< No operation */
|
||||
#define MX66UW1G45G_RESET_ENABLE_CMD 0x66U /*!< Reset Enable */
|
||||
#define MX66UW1G45G_RESET_MEMORY_CMD 0x99U /*!< Reset Memory */
|
||||
|
||||
/***** Register Commands (SPI) ****************************************************/
|
||||
#define MX66UW1G45G_READ_ID_CMD 0x9FU /*!< Read IDentification */
|
||||
#define MX66UW1G45G_READ_SERIAL_FLASH_DISCO_PARAM_CMD 0x5AU /*!< Read Serial Flash Discoverable Parameter */
|
||||
#define MX66UW1G45G_READ_STATUS_REG_CMD 0x05U /*!< Read Status Register */
|
||||
#define MX66UW1G45G_READ_CFG_REG_CMD 0x15U /*!< Read configuration Register */
|
||||
#define MX66UW1G45G_WRITE_STATUS_REG_CMD 0x01U /*!< Write Status Register */
|
||||
#define MX66UW1G45G_READ_CFG_REG2_CMD 0x71U /*!< Read configuration Register2 */
|
||||
#define MX66UW1G45G_WRITE_CFG_REG2_CMD 0x72U /*!< Write configuration Register2 */
|
||||
#define MX66UW1G45G_READ_FAST_BOOT_REG_CMD 0x16U /*!< Read fast boot Register */
|
||||
#define MX66UW1G45G_WRITE_FAST_BOOT_REG_CMD 0x17U /*!< Write fast boot Register */
|
||||
#define MX66UW1G45G_ERASE_FAST_BOOT_REG_CMD 0x18U /*!< Erase fast boot Register */
|
||||
#define MX66UW1G45G_READ_SECURITY_REG_CMD 0x2BU /*!< Read security Register */
|
||||
#define MX66UW1G45G_WRITE_SECURITY_REG_CMD 0x2FU /*!< Write security Register */
|
||||
#define MX66UW1G45G_READ_LOCK_REG_CMD 0x2DU /*!< Read lock Register */
|
||||
#define MX66UW1G45G_WRITE_LOCK_REG_CMD 0x2CU /*!< Write lock Register */
|
||||
|
||||
#define MX66UW1G45G_READ_DPB_REG_CMD 0xE0U /*!< Read DPB register */
|
||||
#define MX66UW1G45G_WRITE_DPB_REG_CMD 0xE1U /*!< Write DPB register */
|
||||
#define MX66UW1G45G_READ_SPB_STATUS_CMD 0xE2U /*!< Read SPB status */
|
||||
#define MX66UW1G45G_WRITE_SPB_BIT_CMD 0xE3U /*!< SPB bit program */
|
||||
#define MX66UW1G45G_ERASE_ALL_SPB_CMD 0xE4U /*!< Erase all SPB bit */
|
||||
#define MX66UW1G45G_WRITE_PROTECT_SEL_CMD 0x68U /*!< Write Protect selection */
|
||||
#define MX66UW1G45G_GANG_BLOCK_LOCK_CMD 0x7EU /*!< Gang block lock: whole chip write protect */
|
||||
#define MX66UW1G45G_GANG_BLOCK_UNLOCK_CMD 0x98U /*!< Gang block unlock: whole chip write unprotect */
|
||||
#define MX66UW1G45G_READ_PASSWORD_REGISTER_CMD 0x27U /*!< Read Password */
|
||||
#define MX66UW1G45G_WRITE_PASSWORD_REGISTER_CMD 0x28U /*!< Write Password */
|
||||
#define MX66UW1G45G_PASSWORD_UNLOCK_CMD 0x29U /*!< Unlock Password */
|
||||
|
||||
|
||||
/*******************************************************************/
|
||||
/********************************* OPI ****************************/
|
||||
/*******************************************************************/
|
||||
|
||||
/***** READ/WRITE MEMORY Operations ****************************/
|
||||
#define MX66UW1G45G_OCTA_READ_CMD 0xEC13U /*!< Octa IO Read */
|
||||
#define MX66UW1G45G_OCTA_READ_DTR_CMD 0xEE11U /*!< Octa IO Read DTR */
|
||||
#define MX66UW1G45G_OCTA_PAGE_PROG_CMD 0x12EDU /*!< Octa Page Program */
|
||||
#define MX66UW1G45G_OCTA_SECTOR_ERASE_4K_CMD 0x21DEU /*!< Octa SubSector Erase 4KB */
|
||||
#define MX66UW1G45G_OCTA_BLOCK_ERASE_64K_CMD 0xDC23U /*!< Octa Sector Erase 64KB 3 */
|
||||
#define MX66UW1G45G_OCTA_BULK_ERASE_CMD 0x609FU /*!< Octa Bulk Erase */
|
||||
|
||||
/***** Setting commands ************************************************************/
|
||||
#define MX66UW1G45G_OCTA_WRITE_ENABLE_CMD 0x06F9U /*!< Octa Write Enable */
|
||||
#define MX66UW1G45G_OCTA_WRITE_DISABLE_CMD 0x04FBU /*!< Octa Write Disable */
|
||||
#define MX66UW1G45G_OCTA_PROG_ERASE_SUSPEND_CMD 0xB04FU /*!< Octa Program/Erase suspend */
|
||||
#define MX66UW1G45G_OCTA_PROG_ERASE_RESUME_CMD 0x30CFU /*!< Octa Program/Erase resume */
|
||||
#define MX66UW1G45G_OCTA_ENTER_DEEP_POWER_DOWN_CMD 0xB946U /*!< Octa Enter deep power down */
|
||||
#define MX66UW1G45G_OCTA_RELEASE_DEEP_POWER_DOWN_CMD 0xAB54U /*!< Octa Release from deep power down */
|
||||
#define MX66UW1G45G_OCTA_SET_BURST_LENGTH_CMD 0xC03FU /*!< Octa Set burst length */
|
||||
#define MX66UW1G45G_OCTA_ENTER_SECURED_OTP_CMD 0xB14EU /*!< Octa Enter secured OTP) */
|
||||
#define MX66UW1G45G_OCTA_EXIT_SECURED_OTP_CMD 0xC13EU /*!< Octa Exit secured OTP) */
|
||||
|
||||
/***** RESET commands ************************************************************/
|
||||
#define MX66UW1G45G_OCTA_NOP_CMD 0x00FFU /*!< Octa No operation */
|
||||
#define MX66UW1G45G_OCTA_RESET_ENABLE_CMD 0x6699U /*!< Octa Reset Enable */
|
||||
#define MX66UW1G45G_OCTA_RESET_MEMORY_CMD 0x9966U /*!< Octa Reset Memory */
|
||||
|
||||
/***** Register Commands (OPI) ****************************************************/
|
||||
#define MX66UW1G45G_OCTA_READ_ID_CMD 0x9F60U /*!< Octa Read IDentification */
|
||||
#define MX66UW1G45G_OCTA_READ_SERIAL_FLASH_DISCO_PARAM_CMD 0x5AA5U /*!< Octa Read Serial Flash Discoverable Parameter */
|
||||
#define MX66UW1G45G_OCTA_READ_STATUS_REG_CMD 0x05FAU /*!< Octa Read Status Register */
|
||||
#define MX66UW1G45G_OCTA_READ_CFG_REG_CMD 0x15EAU /*!< Octa Read configuration Register */
|
||||
#define MX66UW1G45G_OCTA_WRITE_STATUS_REG_CMD 0x01FEU /*!< Octa Write Status Register */
|
||||
#define MX66UW1G45G_OCTA_READ_CFG_REG2_CMD 0x718EU /*!< Octa Read configuration Register2 */
|
||||
#define MX66UW1G45G_OCTA_WRITE_CFG_REG2_CMD 0x728DU /*!< Octa Write configuration Register2 */
|
||||
#define MX66UW1G45G_OCTA_READ_FAST_BOOT_REG_CMD 0x16E9U /*!< Octa Read fast boot Register */
|
||||
#define MX66UW1G45G_OCTA_WRITE_FAST_BOOT_REG_CMD 0x17E8U /*!< Octa Write fast boot Register */
|
||||
#define MX66UW1G45G_OCTA_ERASE_FAST_BOOT_REG_CMD 0x18E7U /*!< Octa Erase fast boot Register */
|
||||
#define MX66UW1G45G_OCTA_READ_SECURITY_REG_CMD 0x2BD4U /*!< Octa Read security Register */
|
||||
#define MX66UW1G45G_OCTA_WRITE_SECURITY_REG_CMD 0x2FD0U /*!< Octa Write security Register */
|
||||
#define MX66UW1G45G_OCTA_READ_LOCK_REG_CMD 0x2DD2U /*!< Octa Read lock Register */
|
||||
#define MX66UW1G45G_OCTA_WRITE_LOCK_REG_CMD 0x2CD3U /*!< Octa Write lock Register */
|
||||
#define MX66UW1G45G_OCTA_READ_DPB_REG_CMD 0xE01FU /*!< Octa Read DPB register */
|
||||
#define MX66UW1G45G_OCTA_WRITE_DPB_REG_CMD 0xE11EU /*!< Octa Write DPB register */
|
||||
#define MX66UW1G45G_OCTA_READ_SPB_STATUS_CMD 0xE21DU /*!< Octa Read SPB status */
|
||||
#define MX66UW1G45G_OCTA_WRITE_SPB_BIT_CMD 0xE31CU /*!< Octa SPB bit program */
|
||||
#define MX66UW1G45G_OCTA_ERASE_ALL_SPB_CMD 0xE41BU /*!< Octa Erase all SPB bit */
|
||||
#define MX66UW1G45G_OCTA_WRITE_PROTECT_SEL_CMD 0x6897U /*!< Octa Write Protect selection */
|
||||
#define MX66UW1G45G_OCTA_GANG_BLOCK_LOCK_CMD 0x7E81U /*!< Octa Gang block lock: whole chip write protect */
|
||||
#define MX66UW1G45G_OCTA_GANG_BLOCK_UNLOCK_CMD 0x9867U /*!< Octa Gang block unlock: whole chip write unprote*/
|
||||
#define MX66UW1G45G_OCTA_READ_PASSWORD_REGISTER_CMD 0x27D8U /*!< Octa Read Password */
|
||||
#define MX66UW1G45G_OCTA_WRITE_PASSWORD_REGISTER_CMD 0x28D7U /*!< Octa Write Password */
|
||||
#define MX66UW1G45G_OCTA_PASSWORD_UNLOCK_CMD 0x29D6U /*!< Octa Unlock Password */
|
||||
|
||||
/******************************************************************************
|
||||
* @brief MX66UW1G45G Registers
|
||||
****************************************************************************/
|
||||
/* Status Register */
|
||||
#define MX66UW1G45G_SR_WIP 0x01U /*!< Write in progress */
|
||||
#define MX66UW1G45G_SR_WEL 0x02U /*!< Write enable latch */
|
||||
#define MX66UW1G45G_SR_PB 0x3CU /*!< Block protected against program and erase operations */
|
||||
|
||||
/* Configuration Register 1 */
|
||||
#define MX66UW1G45G_CR1_ODS 0x07U /*!< Output driver strength */
|
||||
#define MX66UW1G45G_CR1_TB 0x08U /*!< Top / bottom selected */
|
||||
#define MX66UW1G45G_CR1_PBE 0x10U /*!< Preamble bit enable */
|
||||
|
||||
/* Configuration Register 2 */
|
||||
/* Address : 0x00000000 */
|
||||
#define MX66UW1G45G_CR2_REG1_ADDR 0x00000000U /*!< CR2 register address 0x00000000 */
|
||||
#define MX66UW1G45G_CR2_SOPI 0x01U /*!< STR OPI Enable */
|
||||
#define MX66UW1G45G_CR2_DOPI 0x02U /*!< DTR OPI Enable */
|
||||
/* Address : 0x00000200 */
|
||||
#define MX66UW1G45G_CR2_REG2_ADDR 0x00000200U /*!< CR2 register address 0x00000200 */
|
||||
#define MX66UW1G45G_CR2_DQSPRC 0x01U /*!< DTR DQS pre-cycle */
|
||||
#define MX66UW1G45G_CR2_DOS 0x02U /*!< DQS on STR mode */
|
||||
/* Address : 0x00000300 */
|
||||
#define MX66UW1G45G_CR2_REG3_ADDR 0x00000300U /*!< CR2 register address 0x00000300 */
|
||||
#define MX66UW1G45G_CR2_DC 0x07U /*!< Dummy cycle */
|
||||
#define MX66UW1G45G_CR2_DC_20_CYCLES 0x00U /*!< 20 Dummy cycles */
|
||||
#define MX66UW1G45G_CR2_DC_18_CYCLES 0x01U /*!< 18 Dummy cycles */
|
||||
#define MX66UW1G45G_CR2_DC_16_CYCLES 0x02U /*!< 16 Dummy cycles */
|
||||
#define MX66UW1G45G_CR2_DC_14_CYCLES 0x03U /*!< 14 Dummy cycles */
|
||||
#define MX66UW1G45G_CR2_DC_12_CYCLES 0x04U /*!< 12 Dummy cycles */
|
||||
#define MX66UW1G45G_CR2_DC_10_CYCLES 0x05U /*!< 10 Dummy cycles */
|
||||
#define MX66UW1G45G_CR2_DC_8_CYCLES 0x06U /*!< 8 Dummy cycles */
|
||||
#define MX66UW1G45G_CR2_DC_6_CYCLES 0x07U /*!< 6 Dummy cycles */
|
||||
/* Address : 0x00000500 */
|
||||
#define MX66UW1G45G_CR2_REG4_ADDR 0x00000500U /*!< CR2 register address 0x00000500 */
|
||||
#define MX66UW1G45G_CR2_PPTSEL 0x01U /*!< Preamble pattern selection */
|
||||
/* Address : 0x40000000 */
|
||||
#define MX66UW1G45G_CR2_REG5_ADDR 0x40000000U /*!< CR2 register address 0x40000000 */
|
||||
#define MX66UW1G45G_CR2_DEFSOPI 0x01U /*!< Enable SOPI after power on reset */
|
||||
#define MX66UW1G45G_CR2_DEFDOPI 0x02U /*!< Enable DOPI after power on reset */
|
||||
|
||||
/* Security Register */
|
||||
#define MX66UW1G45G_SECR_SOI 0x01U /*!< Secured OTP indicator */
|
||||
#define MX66UW1G45G_SECR_LDSO 0x02U /*!< Lock-down secured OTP */
|
||||
#define MX66UW1G45G_SECR_PSB 0x04U /*!< Program suspend bit */
|
||||
#define MX66UW1G45G_SECR_ESB 0x08U /*!< Erase suspend bit */
|
||||
#define MX66UW1G45G_SECR_P_FAIL 0x20U /*!< Program fail flag */
|
||||
#define MX66UW1G45G_SECR_E_FAIL 0x40U /*!< Erase fail flag */
|
||||
#define MX66UW1G45G_SECR_WPSEL 0x80U /*!< Write protection selection */
|
||||
|
||||
#define XSPI_ALTERNATE_BYTE_PATTERN 0x00U
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup MX66UW1G45G_Exported_Types MX66UW1G45G Exported Types
|
||||
* @{
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint32_t FlashSize; /*!< Size of the flash */
|
||||
uint32_t EraseSectorSize; /*!< Size of sectors for the erase operation */
|
||||
uint32_t EraseSectorsNumber; /*!< Number of sectors for the erase operation */
|
||||
uint32_t EraseSubSectorSize; /*!< Size of subsector for the erase operation */
|
||||
uint32_t EraseSubSectorNumber; /*!< Number of subsector for the erase operation */
|
||||
uint32_t EraseSubSector1Size; /*!< Size of subsector 1 for the erase operation */
|
||||
uint32_t EraseSubSector1Number; /*!< Number of subsector 1 for the erase operation */
|
||||
uint32_t ProgPageSize; /*!< Size of pages for the program operation */
|
||||
uint32_t ProgPagesNumber; /*!< Number of pages for the program operation */
|
||||
} MX66UW1G45G_Info_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MX66UW1G45G_SPI_MODE = 0, /*!< 1-1-1 commands, Power on H/W default setting */
|
||||
MX66UW1G45G_OPI_MODE /*!< 8-8-8 commands */
|
||||
} MX66UW1G45G_Interface_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MX66UW1G45G_STR_TRANSFER = 0, /*!< Single Transfer Rate */
|
||||
MX66UW1G45G_DTR_TRANSFER /*!< Double Transfer Rate */
|
||||
} MX66UW1G45G_Transfer_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MX66UW1G45G_ERASE_4K = 0, /*!< 4K size Sector erase */
|
||||
MX66UW1G45G_ERASE_64K, /*!< 64K size Block erase */
|
||||
MX66UW1G45G_ERASE_BULK /*!< Whole bulk erase */
|
||||
} MX66UW1G45G_Erase_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MX66UW1G45G_3BYTES_SIZE = 0, /*!< 3 Bytes address mode */
|
||||
MX66UW1G45G_4BYTES_SIZE /*!< 4 Bytes address mode */
|
||||
} MX66UW1G45G_AddressWidth_t;
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup MX66UW1G45G_Exported_Functions MX66UW1G45G Exported Functions
|
||||
* @{
|
||||
*/
|
||||
/* Function by commands combined */
|
||||
int32_t MX66UW1G45G_GetFlashInfo(MX66UW1G45G_Info_t *pInfo);
|
||||
int32_t MX66UW1G45G_AutoPollingMemReady(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode,
|
||||
MX66UW1G45G_Transfer_t Rate);
|
||||
|
||||
/* Read/Write Array Commands **************************************************/
|
||||
int32_t MX66UW1G45G_ReadSTR(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode,
|
||||
MX66UW1G45G_AddressWidth_t AddressWidth, uint8_t *pData, uint32_t ReadAddr, uint32_t Size);
|
||||
int32_t MX66UW1G45G_ReadDTR(XSPI_HandleTypeDef *Ctx, uint8_t *pData, uint32_t ReadAddr, uint32_t Size);
|
||||
int32_t MX66UW1G45G_PageProgram(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode,
|
||||
MX66UW1G45G_AddressWidth_t AddressWidth, uint8_t *pData, uint32_t WriteAddr,
|
||||
uint32_t Size);
|
||||
int32_t MX66UW1G45G_PageProgramDTR(XSPI_HandleTypeDef *Ctx, uint8_t *pData, uint32_t WriteAddr, uint32_t Size);
|
||||
int32_t MX66UW1G45G_BlockErase(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode, MX66UW1G45G_Transfer_t Rate,
|
||||
MX66UW1G45G_AddressWidth_t AddressWidth, uint32_t BlockAddress,
|
||||
MX66UW1G45G_Erase_t BlockSize);
|
||||
int32_t MX66UW1G45G_ChipErase(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode, MX66UW1G45G_Transfer_t Rate);
|
||||
int32_t MX66UW1G45G_EnableMemoryMappedModeSTR(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode,
|
||||
MX66UW1G45G_AddressWidth_t AddressWidth);
|
||||
int32_t MX66UW1G45G_EnableMemoryMappedModeDTR(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode);
|
||||
int32_t MX66UW1G45G_Suspend(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode, MX66UW1G45G_Transfer_t Rate);
|
||||
int32_t MX66UW1G45G_Resume(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode, MX66UW1G45G_Transfer_t Rate);
|
||||
|
||||
/* Register/Setting Commands **************************************************/
|
||||
int32_t MX66UW1G45G_WriteEnable(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode, MX66UW1G45G_Transfer_t Rate);
|
||||
int32_t MX66UW1G45G_WriteDisable(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode, MX66UW1G45G_Transfer_t Rate);
|
||||
int32_t MX66UW1G45G_ReadStatusRegister(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode,
|
||||
MX66UW1G45G_Transfer_t Rate, uint8_t *Value);
|
||||
int32_t MX66UW1G45G_WriteStatusRegister(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode,
|
||||
MX66UW1G45G_Transfer_t Rate, uint8_t Value);
|
||||
int32_t MX66UW1G45G_WriteCfgRegister(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode,
|
||||
MX66UW1G45G_Transfer_t Rate, uint8_t Value);
|
||||
int32_t MX66UW1G45G_ReadCfgRegister(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode,
|
||||
MX66UW1G45G_Transfer_t Rate, uint8_t *Value);
|
||||
int32_t MX66UW1G45G_WriteCfg2Register(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode,
|
||||
MX66UW1G45G_Transfer_t Rate, uint32_t WriteAddr, uint8_t Value);
|
||||
int32_t MX66UW1G45G_ReadCfg2Register(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode,
|
||||
MX66UW1G45G_Transfer_t Rate, uint32_t ReadAddr, uint8_t *Value);
|
||||
int32_t MX66UW1G45G_WriteSecurityRegister(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode,
|
||||
MX66UW1G45G_Transfer_t Rate, uint8_t Value);
|
||||
int32_t MX66UW1G45G_ReadSecurityRegister(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode,
|
||||
MX66UW1G45G_Transfer_t Rate, uint8_t *Value);
|
||||
|
||||
/* ID/Security Commands *******************************************************/
|
||||
int32_t MX66UW1G45G_ReadID(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode, MX66UW1G45G_Transfer_t Rate,
|
||||
uint8_t *ID);
|
||||
|
||||
/* Reset Commands *************************************************************/
|
||||
int32_t MX66UW1G45G_ResetEnable(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode, MX66UW1G45G_Transfer_t Rate);
|
||||
int32_t MX66UW1G45G_ResetMemory(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode, MX66UW1G45G_Transfer_t Rate);
|
||||
int32_t MX66UW1G45G_NoOperation(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode, MX66UW1G45G_Transfer_t Rate);
|
||||
int32_t MX66UW1G45G_EnterPowerDown(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode,
|
||||
MX66UW1G45G_Transfer_t Rate);
|
||||
int32_t MX66UW1G45G_ReleasePowerDown(XSPI_HandleTypeDef *Ctx, MX66UW1G45G_Interface_t Mode,
|
||||
MX66UW1G45G_Transfer_t Rate);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MX66UW1G45G_H */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file mx66uw1g45g_conf.h
|
||||
* @author MCD Application Team
|
||||
* @brief MX66UW1G45G OctoSPI memory configuration template file.
|
||||
* This file should be copied to the application folder and renamed
|
||||
* to mx66uw1g45g_conf.h
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2023 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 MX66UW1G45G_CONF_H
|
||||
#define MX66UW1G45G_CONF_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32xxxx_hal.h"
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
#define CONF_OSPI_ODS MX66UW1G45G_CR_ODS_24 /* MX66UW1G45G Output Driver Strength */
|
||||
|
||||
#define DUMMY_CYCLES_READ 8U
|
||||
#define DUMMY_CYCLES_READ_OCTAL 6U
|
||||
#define DUMMY_CYCLES_READ_OCTAL_DTR 6U
|
||||
#define DUMMY_CYCLES_REG_OCTAL 4U
|
||||
#define DUMMY_CYCLES_REG_OCTAL_DTR 5U
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MX66UW1G45G_CONF_H */
|
||||
@@ -0,0 +1,27 @@
|
||||
Copyright 2023 STMicroelectronics.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation and/or
|
||||
other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,6 @@
|
||||
This software component is provided to you as part of a software package and
|
||||
applicable license terms are in the Package_license file. If you received this
|
||||
software component outside of a package or without applicable license terms,
|
||||
the terms of the BSD-3-Clause license shall apply.
|
||||
You may obtain a copy of the BSD-3-Clause at:
|
||||
https://opensource.org/licenses/BSD-3-Clause
|
||||
@@ -0,0 +1,98 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
<title>Release Notes for WM8904 Audio Codec Component Driver</title>
|
||||
<style>
|
||||
code{white-space: pre-wrap;}
|
||||
span.smallcaps{font-variant: small-caps;}
|
||||
div.columns{display: flex; gap: min(4vw, 1.5em);}
|
||||
div.column{flex: auto; overflow-x: auto;}
|
||||
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
|
||||
/* The extra [class] is a hack that increases specificity enough to
|
||||
override a similar rule in reveal.js */
|
||||
ul.task-list[class]{list-style: none;}
|
||||
ul.task-list li input[type="checkbox"] {
|
||||
font-size: inherit;
|
||||
width: 0.8em;
|
||||
margin: 0 0.8em 0.2em -1.6em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
|
||||
</style>
|
||||
<link rel="stylesheet" href="_htmresc/mini-st_2020.css" />
|
||||
<link rel="icon" type="image/x-icon" href="_htmresc/favicon.png" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-lg-4">
|
||||
<center>
|
||||
<h1 id="release-notes-for-wm8904-component-driver">Release Notes for
|
||||
<mark>WM8904</mark> Component Driver</h1>
|
||||
<p>Copyright © 2024 STMicroelectronics<br />
|
||||
</p>
|
||||
<a href="https://www.st.com" class="logo"><img
|
||||
src="_htmresc/st_logo_2020.png" alt="ST logo" /></a>
|
||||
</center>
|
||||
<h1 id="purpose">Purpose</h1>
|
||||
<p>This driver provides a set of audio functions offered by WM8904 Codec
|
||||
component</p>
|
||||
</div>
|
||||
<section id="update-history" class="col-sm-12 col-lg-8">
|
||||
<h1>Update History</h1>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section3" checked aria-hidden="true">
|
||||
<label for="collapse-section3" aria-hidden="true"><strong>V1.1.1 /
|
||||
15-September-2025</strong></label>
|
||||
<h2 id="main-changes">Main Changes</h2>
|
||||
<ul>
|
||||
<li>Maintenance release of <strong>WM8904</strong> Audio Codec
|
||||
driver</li>
|
||||
<li>Changes compared with V1.1.0 release
|
||||
<ul>
|
||||
<li>Reduce excessive initialization delay by checking stabilization
|
||||
ready flag instead of waiting a fixed time</li>
|
||||
<li>Update initialization to use output device passed as parameter
|
||||
instead of current device which is not yet initialized</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section2" aria-hidden="true">
|
||||
<label for="collapse-section2" aria-hidden="true"><strong>V1.1.0 /
|
||||
20-September-2024</strong></label>
|
||||
<h2 id="main-changes-1">Main Changes</h2>
|
||||
<ul>
|
||||
<li>First maintenance release of <strong>WM8904</strong> Audio Codec
|
||||
driver</li>
|
||||
<li>Changes compared with V1.0.0 release
|
||||
<ul>
|
||||
<li>Update input devices to be defined as bitfields</li>
|
||||
<li>Implement LINE_IN2 and digital microphone path</li>
|
||||
<li>Add 24KHz audio frequency support</li>
|
||||
<li>Update IsInitialized variable at the end of init function
|
||||
WM8904_Init()</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section1" aria-hidden="true">
|
||||
<label for="collapse-section1" aria-hidden="true"><strong>V1.0.0 /
|
||||
28-February-2024</strong></label>
|
||||
<h2 id="main-changes-2">Main Changes</h2>
|
||||
<ul>
|
||||
<li>First official release of <strong>WM8904</strong> Audio Codec
|
||||
driver</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<footer class="sticky">
|
||||
For complete documentation on <mark>STM32 Microcontrollers</mark> ,
|
||||
visit: <span style="font-color: blue;"><a
|
||||
href="http://www.st.com/STM32">www.st.com</a></span>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
---
|
||||
pagetitle: Release Notes for WM8904 Audio Codec Component Driver
|
||||
lang: en
|
||||
header-includes: <link rel="icon" type="image/x-icon" href="_htmresc/favicon.png" />
|
||||
---
|
||||
::: {.row}
|
||||
::: {.col-sm-12 .col-lg-4}
|
||||
|
||||
<center>
|
||||
# Release Notes for <mark>WM8904</mark> Component Driver
|
||||
Copyright © 2024 STMicroelectronics\
|
||||
|
||||
[](https://www.st.com){.logo}
|
||||
</center>
|
||||
|
||||
# Purpose
|
||||
|
||||
This driver provides a set of audio functions offered by WM8904 Codec component
|
||||
|
||||
:::
|
||||
|
||||
::: {.col-sm-12 .col-lg-8}
|
||||
# Update History
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section3" checked aria-hidden="true">
|
||||
<label for="collapse-section3" aria-hidden="true">__V1.1.1 / 15-September-2025__</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
- Maintenance release of **WM8904** Audio Codec driver
|
||||
- Changes compared with V1.1.0 release
|
||||
- Reduce excessive initialization delay by checking stabilization ready flag instead of waiting a fixed time
|
||||
- Update initialization to use output device passed as parameter instead of current device which is not yet initialized
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section2" aria-hidden="true">
|
||||
<label for="collapse-section2" aria-hidden="true">__V1.1.0 / 20-September-2024__</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
- First maintenance release of **WM8904** Audio Codec driver
|
||||
- Changes compared with V1.0.0 release
|
||||
- Update input devices to be defined as bitfields
|
||||
- Implement LINE_IN2 and digital microphone path
|
||||
- Add 24KHz audio frequency support
|
||||
- Update IsInitialized variable at the end of init function WM8904_Init()
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
::: {.collapse}
|
||||
<input type="checkbox" id="collapse-section1" aria-hidden="true">
|
||||
<label for="collapse-section1" aria-hidden="true">__V1.0.0 / 28-February-2024__</label>
|
||||
<div>
|
||||
|
||||
## Main Changes
|
||||
|
||||
- First official release of **WM8904** Audio Codec driver
|
||||
|
||||
</div>
|
||||
:::
|
||||
|
||||
:::
|
||||
:::
|
||||
|
||||
<footer class="sticky">
|
||||
For complete documentation on <mark>STM32 Microcontrollers</mark> ,
|
||||
visit: [[www.st.com](http://www.st.com/STM32)]{style="font-color: blue;"}
|
||||
</footer>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><g fill="#13254a"><path d="M100 .212C44.868.212 0 44.889 0 99.788c0 55.132 44.868 100 100 100s100-44.868 100-100C200 44.889 155.132.212 100 .212zm0 181.164c-44.974 0-81.587-36.614-81.587-81.587 0-44.762 36.614-81.164 81.587-81.164 44.995 0 81.587 36.402 81.587 81.164 0 44.973-36.592 81.587-81.587 81.587z" style="fill: #e6007e;"/><path d="M141.1 88.127h-29.439V58.688c0-6.392-5.185-11.598-11.598-11.598-6.413 0-11.619 5.206-11.619 11.598v29.439H58.476c-6.392 0-11.598 5.185-11.598 11.598 0 6.413 5.206 11.619 11.598 11.619h29.968v29.968c0 6.392 5.206 11.598 11.619 11.598 6.413 0 11.598-5.206 11.598-11.598v-29.968H141.1c6.392 0 11.598-5.206 11.598-11.619 0-6.413-5.206-11.598-11.598-11.598z" style="fill: #e6007e;"/></g></svg>
|
||||
|
After Width: | Height: | Size: 832 B |
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><g fill="#03234b"><path d="M170.934 64.569l-.04-.055-29.049 40.038-.057.079h14.867a59.366 59.366 0 0 1-1.488 15.615c-1.158 5.318-3.807 13.448-9.848 21.977-2.766 4.118-6.375 7.726-9.208 10.408-3.426 2.857-7.461 6.095-12 8.376-8.121 4.568-17.881 7.138-28.225 7.432-10.907.248-20.201-2.61-26.072-5.052-8.283-3.479-14.111-7.807-16.85-10.078-1.254-.956-2.25-1.907-3.057-2.676a28.662 28.662 0 0 0-1.157-1.069 158.874 158.874 0 0 0-1.479-1.362l-4.435-3.956 3.569 4.81.183.243c.2.263.548.722 1.048 1.389.276.334.579.747.93 1.226l.008.01c.689.939 1.546 2.107 2.664 3.322 3 3.536 8.178 8.801 15.808 13.801 5.969 3.866 15.672 8.901 28.001 10.935a79.05 79.05 0 0 0 12.485.998c7.97 0 15.651-1.228 22.828-3.649 6.366-1.877 12.192-4.981 17.053-7.771 6.16-3.936 10.817-7.586 14.654-11.488 8.084-7.899 14.884-17.913 19.15-28.199 3.259-7.594 5.456-15.727 6.529-24.175l.055-.425.083-.641H200l-29.066-40.063zM58.159 99.232l-12.655.563c-.097-.881-.159-1.986-.227-3.474a59.184 59.184 0 0 1 1.446-16.56c1.157-5.316 3.804-13.444 9.848-21.977 2.168-3.228 5.009-6.44 9.208-10.415 3.41-2.849 7.432-6.08 12.005-8.375 8.114-4.568 17.87-7.138 28.213-7.432 10.9-.25 20.196 2.607 26.072 5.045 8.258 3.473 14.105 7.812 16.857 10.091 1.257.951 2.253 1.904 3.057 2.673l.017.016c.43.411.801.766 1.136 1.051.475.438.841.777 1.091 1.01l.138.128.248.229 4.04 3.613-3.165-4.456c-.058-.083-.312-.417-.73-.971l-.507-.67a28.922 28.922 0 0 1-.901-1.192l-.02-.027c-.69-.945-1.548-2.121-2.677-3.346-3.002-3.537-8.182-8.803-15.813-13.801-5.964-3.865-15.662-8.9-27.997-10.935-8.484-1.363-21.496-2.009-35.313 2.651-6.355 1.88-12.186 4.983-17.054 7.772-6.163 3.944-10.82 7.595-14.654 11.488-8.079 7.894-14.882 17.909-19.155 28.2-3.268 7.624-5.463 15.757-6.523 24.173-.436 3.281-.642 5.421-.664 6.926L0 101.831l30.683 38.727.042.053 27.38-41.298.054-.081z" style="fill: #e6007e;"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
@@ -0,0 +1,224 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file wm8904.h
|
||||
* @author MCD Application Team
|
||||
* @brief This file contains all the functions prototypes for the
|
||||
* wm8904.c driver.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2023 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 WM8904_H
|
||||
#define WM8904_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "wm8904_reg.h"
|
||||
#include <stddef.h>
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Component
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup WM8904
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup WM8904_Exported_Types Exported Types
|
||||
* @{
|
||||
*/
|
||||
typedef int32_t (*WM8904_Init_Func) (void);
|
||||
typedef int32_t (*WM8904_DeInit_Func) (void);
|
||||
typedef int32_t (*WM8904_GetTick_Func) (void);
|
||||
typedef int32_t (*WM8904_WriteReg_Func)(uint16_t, uint16_t, uint8_t*, uint16_t);
|
||||
typedef int32_t (*WM8904_ReadReg_Func) (uint16_t, uint16_t, uint8_t*, uint16_t);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WM8904_Init_Func Init;
|
||||
WM8904_DeInit_Func DeInit;
|
||||
uint16_t Address;
|
||||
WM8904_WriteReg_Func WriteReg;
|
||||
WM8904_ReadReg_Func ReadReg;
|
||||
WM8904_GetTick_Func GetTick;
|
||||
} WM8904_IO_t;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WM8904_IO_t IO;
|
||||
wm8904_ctx_t Ctx;
|
||||
uint8_t IsInitialized;
|
||||
} WM8904_Object_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32_t InputDevice;
|
||||
uint32_t OutputDevice;
|
||||
uint32_t Frequency;
|
||||
uint32_t Resolution;
|
||||
uint32_t Volume;
|
||||
} WM8904_Init_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int32_t ( *Init ) ( WM8904_Object_t *, WM8904_Init_t* );
|
||||
int32_t ( *DeInit ) ( WM8904_Object_t * );
|
||||
int32_t ( *ReadID ) ( WM8904_Object_t *, uint32_t * );
|
||||
int32_t ( *Play ) ( WM8904_Object_t * );
|
||||
int32_t ( *Pause ) ( WM8904_Object_t * );
|
||||
int32_t ( *Resume ) ( WM8904_Object_t * );
|
||||
int32_t ( *Stop ) ( WM8904_Object_t *, uint32_t );
|
||||
int32_t ( *SetFrequency ) ( WM8904_Object_t *, uint32_t );
|
||||
int32_t ( *GetFrequency ) ( WM8904_Object_t *, uint32_t*);
|
||||
int32_t ( *SetVolume ) ( WM8904_Object_t *, uint32_t, uint8_t );
|
||||
int32_t ( *GetVolume ) ( WM8904_Object_t *, uint32_t, uint8_t*);
|
||||
int32_t ( *SetMute ) ( WM8904_Object_t *, uint32_t );
|
||||
int32_t ( *SetOutputMode ) ( WM8904_Object_t *, uint32_t );
|
||||
int32_t ( *SetResolution ) ( WM8904_Object_t *, uint32_t );
|
||||
int32_t ( *GetResolution ) ( WM8904_Object_t *, uint32_t*);
|
||||
int32_t ( *SetProtocol ) ( WM8904_Object_t *, uint32_t );
|
||||
int32_t ( *GetProtocol ) ( WM8904_Object_t *, uint32_t*);
|
||||
int32_t ( *Reset ) ( WM8904_Object_t * );
|
||||
} WM8904_Drv_t;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup WM8904_Exported_Constants Exported Constants
|
||||
* @{
|
||||
*/
|
||||
#define WM8904_OK (0)
|
||||
#define WM8904_ERROR (-1)
|
||||
|
||||
/******************************************************************************/
|
||||
/*************************** Codec User defines ******************************/
|
||||
/******************************************************************************/
|
||||
/* Audio Input Device */
|
||||
#define WM8904_IN_NONE 0x0000U
|
||||
#define WM8904_IN_MIC1 0x0100U
|
||||
#define WM8904_IN_MIC2 0x0200U
|
||||
#define WM8904_IN_MIC1_MIC2 0x0300U
|
||||
#define WM8904_IN_LINE1 0x0400U
|
||||
#define WM8904_IN_LINE2 0x0800U
|
||||
#define WM8904_IN_DIGITAL_MIC1 0x1000U
|
||||
#define WM8904_IN_DIGITAL_MIC2 0x2000U
|
||||
|
||||
/* Audio Output Device */
|
||||
#define WM8904_OUT_NONE 0x0000U
|
||||
#define WM8904_OUT_HEADPHONE 0x0001U
|
||||
#define WM8904_OUT_LINE 0x0002U
|
||||
#define WM8904_OUT_BOTH 0x0003U
|
||||
|
||||
/* AUDIO FREQUENCY */
|
||||
#define WM8904_FREQUENCY_192K 192000U
|
||||
#define WM8904_FREQUENCY_176K 176400U
|
||||
#define WM8904_FREQUENCY_96K 96000U
|
||||
#define WM8904_FREQUENCY_88K 88200U
|
||||
#define WM8904_FREQUENCY_48K 48000U
|
||||
#define WM8904_FREQUENCY_44K 44100U
|
||||
#define WM8904_FREQUENCY_32K 32000U
|
||||
#define WM8904_FREQUENCY_24K 24000U
|
||||
#define WM8904_FREQUENCY_22K 22050U
|
||||
#define WM8904_FREQUENCY_16K 16000U
|
||||
#define WM8904_FREQUENCY_11K 11025U
|
||||
#define WM8904_FREQUENCY_8K 8000U
|
||||
|
||||
/* AUDIO RESOLUTION */
|
||||
#define WM8904_RESOLUTION_16B 0x00U
|
||||
#define WM8904_RESOLUTION_20B 0x01U
|
||||
#define WM8904_RESOLUTION_24B 0x02U
|
||||
#define WM8904_RESOLUTION_32B 0x03U
|
||||
|
||||
/* Codec stop options */
|
||||
#define WM8904_PDWN_HW 0x00U
|
||||
#define WM8904_PDWN_SW 0x01U
|
||||
|
||||
/* Volume Input Output selection */
|
||||
#define VOLUME_INPUT 0U
|
||||
#define VOLUME_OUTPUT 1U
|
||||
|
||||
/* MUTE commands */
|
||||
#define WM8904_MUTE_ON 1U
|
||||
#define WM8904_MUTE_OFF 0U
|
||||
|
||||
/* AUDIO PROTOCOL */
|
||||
#define WM8904_PROTOCOL_R_JUSTIFIED 0x0000U
|
||||
#define WM8904_PROTOCOL_L_JUSTIFIED 0x0001U
|
||||
#define WM8904_PROTOCOL_I2S 0x0002U
|
||||
#define WM8904_PROTOCOL_DSP 0x0003U
|
||||
|
||||
/**
|
||||
* @brief WM8904 ID
|
||||
*/
|
||||
#define WM8904_ID 0x8904U
|
||||
#define WM8904_ID_MASK 0xFFFFU
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @addtogroup WM8904_Exported_Variables
|
||||
* @{
|
||||
*/
|
||||
/* Audio driver structure */
|
||||
extern WM8904_Drv_t WM8904_Driver;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @addtogroup WM8904_Exported_Functions
|
||||
* @{
|
||||
*/
|
||||
/*------------------------------------------------------------------------------
|
||||
Audio Codec functions
|
||||
------------------------------------------------------------------------------*/
|
||||
/* High Layer codec functions */
|
||||
int32_t WM8904_RegisterBusIO (WM8904_Object_t *pObj, const WM8904_IO_t *pIO);
|
||||
int32_t WM8904_Init(WM8904_Object_t *pObj, WM8904_Init_t *pInit);
|
||||
int32_t WM8904_DeInit(WM8904_Object_t *pObj);
|
||||
int32_t WM8904_ReadID(WM8904_Object_t *pObj, uint32_t *Id);
|
||||
int32_t WM8904_Play(WM8904_Object_t *pObj);
|
||||
int32_t WM8904_Pause(WM8904_Object_t *pObj);
|
||||
int32_t WM8904_Resume(WM8904_Object_t *pObj);
|
||||
int32_t WM8904_Stop(WM8904_Object_t *pObj, uint32_t CodecPdwnMode);
|
||||
int32_t WM8904_SetVolume(WM8904_Object_t *pObj, uint32_t InputOutput, uint8_t Volume);
|
||||
int32_t WM8904_GetVolume(WM8904_Object_t *pObj, uint32_t InputOutput, uint8_t *Volume);
|
||||
int32_t WM8904_SetMute(WM8904_Object_t *pObj, uint32_t Cmd);
|
||||
int32_t WM8904_SetOutputMode(WM8904_Object_t *pObj, uint32_t Output);
|
||||
int32_t WM8904_SetResolution(WM8904_Object_t *pObj, uint32_t Resolution);
|
||||
int32_t WM8904_GetResolution(WM8904_Object_t *pObj, uint32_t *Resolution);
|
||||
int32_t WM8904_SetProtocol(WM8904_Object_t *pObj, uint32_t Protocol);
|
||||
int32_t WM8904_GetProtocol(WM8904_Object_t *pObj, uint32_t *Protocol);
|
||||
int32_t WM8904_SetFrequency(WM8904_Object_t *pObj, uint32_t AudioFreq);
|
||||
int32_t WM8904_GetFrequency(WM8904_Object_t *pObj, uint32_t *AudioFreq);
|
||||
int32_t WM8904_Reset(WM8904_Object_t *pObj);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* WM8904_H */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@@ -0,0 +1,88 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file wm8904_reg.c
|
||||
* @author MCD Application Team
|
||||
* @brief This file provides unitary register function to control the WM8904
|
||||
* Audio Codec driver.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2023 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 "wm8904_reg.h"
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Components
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup wm8904
|
||||
* @brief This file provides a set of functions needed to drive the
|
||||
* WM8904 audio codec.
|
||||
* @{
|
||||
*/
|
||||
|
||||
/************** Generic Function *******************/
|
||||
/*******************************************************************************
|
||||
* Function Name : wm8904_read_reg
|
||||
* Description : Generic Reading function. It must be full-filled with either
|
||||
* I2C or SPI reading functions
|
||||
* Input : Register Address, length of buffer
|
||||
* Output : data Read
|
||||
*******************************************************************************/
|
||||
int32_t wm8904_read_reg(const wm8904_ctx_t *ctx, uint16_t reg, uint16_t* data, uint16_t length)
|
||||
{
|
||||
int32_t ret;
|
||||
uint16_t tmp;
|
||||
|
||||
ret = ctx->ReadReg(ctx->handle, reg, (uint8_t *)data, length);
|
||||
|
||||
if(ret >= 0)
|
||||
{
|
||||
tmp = ((uint16_t)(*data >> 8) & 0x00FFU);
|
||||
tmp |= ((uint16_t)(*data << 8) & 0xFF00U);
|
||||
*data = tmp;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name : wm8904_write_reg
|
||||
* Description : Generic Writing function. It must be full-filled with either
|
||||
* I2C or SPI writing function
|
||||
* Input : Register Address, data to be written, length of buffer
|
||||
* Output : None
|
||||
*******************************************************************************/
|
||||
int32_t wm8904_write_reg(const wm8904_ctx_t *ctx, uint16_t reg, const uint16_t *data, uint16_t length)
|
||||
{
|
||||
uint16_t tmp;
|
||||
tmp = ((uint16_t)(*data >> 8) & 0x00FFU);
|
||||
tmp |= ((uint16_t)(*data << 8) & 0xFF00U);
|
||||
|
||||
return ctx->WriteReg(ctx->handle, reg, (uint8_t *)&tmp, length);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@@ -0,0 +1,228 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file wm8904_reg.h
|
||||
* @author MCD Application Team
|
||||
* @brief Header of wm8904_reg.c
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* Copyright (c) 2023 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 WM8904_REG_H
|
||||
#define WM8904_REG_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Component
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup WM8904
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/** @addtogroup WM8904_Exported_Constants
|
||||
* @{
|
||||
*/
|
||||
/******************************************************************************/
|
||||
/****************************** REGISTER MAPPING ******************************/
|
||||
/******************************************************************************/
|
||||
/* SW Reset */
|
||||
#define WM8904_SW_RESET 0x0000U
|
||||
|
||||
/* Bias Control */
|
||||
#define WM8904_BIAS_CONTROL0 0x0004U
|
||||
#define WM8904_VMID_CONTROL0 0x0005U
|
||||
#define WM8904_MIC_BIAS_CONTROL0 0x0006U
|
||||
#define WM8904_MIC_BIAS_CONTROL1 0x0007U
|
||||
|
||||
#define WM8904_ANALOG_ADC0 0x000AU
|
||||
|
||||
/* Power Management */
|
||||
#define WM8904_PWR_MANAGEMENT0 0x000CU
|
||||
#define WM8904_PWR_MANAGEMENT2 0x000EU
|
||||
#define WM8904_PWR_MANAGEMENT3 0x000FU
|
||||
#define WM8904_PWR_MANAGEMENT6 0x0012U
|
||||
|
||||
/* Clock Rates */
|
||||
#define WM8904_CLOCK_RATES0 0x0014U
|
||||
#define WM8904_CLOCK_RATES1 0x0015U
|
||||
#define WM8904_CLOCK_RATES2 0x0016U
|
||||
|
||||
/* Audio Interface */
|
||||
#define WM8904_AUDIO_INTERFACE0 0x0018U
|
||||
#define WM8904_AUDIO_INTERFACE1 0x0019U
|
||||
#define WM8904_AUDIO_INTERFACE2 0x001AU
|
||||
#define WM8904_AUDIO_INTERFACE3 0x001BU
|
||||
|
||||
/* DAC */
|
||||
#define WM8904_DAC_DIGITAL_VOL_LEFT 0x001EU
|
||||
#define WM8904_DAC_DIGITAL_VOL_RIGHT 0x001FU
|
||||
#define WM8904_DAC_DIGITAL0 0x0020U
|
||||
#define WM8904_DAC_DIGITAL1 0x0021U
|
||||
|
||||
/* ADC */
|
||||
#define WM8904_ADC_DIGITAL_VOL_LEFT 0x0024U
|
||||
#define WM8904_ADC_DIGITAL_VOL_RIGHT 0x0025U
|
||||
#define WM8904_ADC_DIGITAL0 0x0026U
|
||||
|
||||
#define WM8904_DIGITAL_MICROPHONE0 0x0027U
|
||||
|
||||
/* DRC */
|
||||
#define WM8904_DRC0 0x0028U
|
||||
#define WM8904_DRC1 0x0029U
|
||||
#define WM8904_DRC2 0x002AU
|
||||
#define WM8904_DRC3 0x002BU
|
||||
|
||||
/* Analog */
|
||||
#define WM8904_ANALOG_LEFT_INPUT0 0x002CU
|
||||
#define WM8904_ANALOG_RIGHT_INPUT0 0x002DU
|
||||
#define WM8904_ANALOG_LEFT_INPUT1 0x002EU
|
||||
#define WM8904_ANALOG_RIGHT_INPUT1 0x002FU
|
||||
#define WM8904_ANALOG_OUTPUT1_LEFT 0x0039U
|
||||
#define WM8904_ANALOG_OUTPUT1_RIGHT 0x003AU
|
||||
#define WM8904_ANALOG_OUTPUT2_LEFT 0x003BU
|
||||
#define WM8904_ANALOG_OUTPUT2_RIGHT 0x003CU
|
||||
#define WM8904_ANALOG_OUTPUT12_ZC 0x003DU
|
||||
|
||||
/* DC Servo */
|
||||
#define WM8904_DC_SERVO0 0x0043U
|
||||
#define WM8904_DC_SERVO1 0x0044U
|
||||
#define WM8904_DC_SERVO2 0x0045U
|
||||
#define WM8904_DC_SERVO4 0x0047U
|
||||
#define WM8904_DC_SERVO5 0x0048U
|
||||
#define WM8904_DC_SERVO6 0x0049U
|
||||
#define WM8904_DC_SERVO7 0x004AU
|
||||
#define WM8904_DC_SERVO8 0x004BU
|
||||
#define WM8904_DC_SERVO9 0x004CU
|
||||
#define WM8904_DC_SERVO_READBACK0 0x004DU
|
||||
|
||||
/* Analog */
|
||||
#define WM8904_ANALOG_HP0 0x005AU
|
||||
#define WM8904_ANALOG_LINEOUT0 0x005EU
|
||||
|
||||
/* Charge pump */
|
||||
#define WM8904_CHARGE_PUMP0 0x0062U
|
||||
|
||||
/* Class W/G */
|
||||
#define WM8904_CLASS_W0 0x0068U
|
||||
|
||||
/* Write Sequencer */
|
||||
#define WM8904_WRITE_SEQUENCER0 0x006CU
|
||||
#define WM8904_WRITE_SEQUENCER1 0x006DU
|
||||
#define WM8904_WRITE_SEQUENCER2 0x006EU
|
||||
#define WM8904_WRITE_SEQUENCER3 0x006FU
|
||||
#define WM8904_WRITE_SEQUENCER4 0x0070U
|
||||
|
||||
/* FLL Control */
|
||||
#define WM8904_FLL_CONTROL1 0x0074U
|
||||
#define WM8904_FLL_CONTROL2 0x0075U
|
||||
#define WM8904_FLL_CONTROL3 0x0076U
|
||||
#define WM8904_FLL_CONTROL4 0x0077U
|
||||
#define WM8904_FLL_CONTROL5 0x0078U
|
||||
|
||||
/* GPIO Control */
|
||||
#define WM8904_GPIO_CONTROL1 0x0079U
|
||||
#define WM8904_GPIO_CONTROL2 0x007AU
|
||||
#define WM8904_GPIO_CONTROL3 0x007BU
|
||||
#define WM8904_GPIO_CONTROL4 0x007CU
|
||||
|
||||
#define WM8904_DIGITAL_PULLS 0x007EU
|
||||
|
||||
/* Interrupt */
|
||||
#define WM8904_INTERRUPT_STATUS 0x007FU
|
||||
#define WM8904_INTERRUPT_STATUS_MASK 0x0080U
|
||||
#define WM8904_INTERRUPT_POLARITY 0x0081U
|
||||
#define WM8904_INTERRUPT_DEBOUNCE 0x0082U
|
||||
|
||||
/* EQ */
|
||||
#define WM8904_EQ1 0x0086U
|
||||
#define WM8904_EQ2 0x0087U
|
||||
#define WM8904_EQ3 0x0088U
|
||||
#define WM8904_EQ4 0x0089U
|
||||
#define WM8904_EQ5 0x008AU
|
||||
#define WM8904_EQ6 0x008BU
|
||||
#define WM8904_EQ7 0x008CU
|
||||
#define WM8904_EQ8 0x008DU
|
||||
#define WM8904_EQ9 0x008EU
|
||||
#define WM8904_EQ10 0x008FU
|
||||
#define WM8904_EQ11 0x0090U
|
||||
#define WM8904_EQ12 0x0091U
|
||||
#define WM8904_EQ13 0x0092U
|
||||
#define WM8904_EQ14 0x0093U
|
||||
#define WM8904_EQ15 0x0094U
|
||||
#define WM8904_EQ16 0x0095U
|
||||
#define WM8904_EQ17 0x0096U
|
||||
#define WM8904_EQ18 0x0097U
|
||||
#define WM8904_EQ19 0x0098U
|
||||
#define WM8904_EQ20 0x0099U
|
||||
#define WM8904_EQ21 0x009AU
|
||||
#define WM8904_EQ22 0x009BU
|
||||
#define WM8904_EQ23 0x009CU
|
||||
#define WM8904_EQ24 0x009DU
|
||||
|
||||
#define WM8904_ADC_TEST0 0x00C6U
|
||||
|
||||
#define WM8904_FLL_TEST0 0x00F7U
|
||||
#define WM8904_FLL_TEST1 0x00F8U
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/************** Generic Function *******************/
|
||||
|
||||
typedef int32_t (*WM8904_Write_Func)(void *, uint16_t, uint8_t*, uint16_t);
|
||||
typedef int32_t (*WM8904_Read_Func) (void *, uint16_t, uint8_t*, uint16_t);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WM8904_Write_Func WriteReg;
|
||||
WM8904_Read_Func ReadReg;
|
||||
void *handle;
|
||||
} wm8904_ctx_t;
|
||||
|
||||
/*******************************************************************************
|
||||
* Register : Generic - All
|
||||
* Address : Generic - All
|
||||
* Bit Group Name: None
|
||||
* Permission : W
|
||||
*******************************************************************************/
|
||||
int32_t wm8904_write_reg(const wm8904_ctx_t *ctx, uint16_t reg, const uint16_t *data, uint16_t length);
|
||||
int32_t wm8904_read_reg(const wm8904_ctx_t *ctx, uint16_t reg, uint16_t* data, uint16_t length);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* WM8904_REG_H */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||