diff --git a/.gitmodules b/.gitmodules
index eb2f0ce8..bdab2cf5 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -6,3 +6,11 @@
path = Drivers/CMSIS/Device/ST/STM32F2xx
url = https://github.com/STMicroelectronics/cmsis_device_f2.git
branch = master
+[submodule "Drivers/BSP/STM32F2xx_Nucleo_144"]
+ path = Drivers/BSP/STM32F2xx_Nucleo_144
+ url = https://github.com/STMicroelectronics/stm32f2xx-nucleo-144-bsp.git
+ branch = main
+[submodule "Drivers/BSP/STM322xG_EVAL"]
+ path = Drivers/BSP/STM322xG_EVAL
+ url = https://github.com/STMicroelectronics/stm322xg-eval-bsp.git
+ branch = main
diff --git a/Drivers/BSP/STM322xG_EVAL b/Drivers/BSP/STM322xG_EVAL
new file mode 160000
index 00000000..ee9ca2e0
--- /dev/null
+++ b/Drivers/BSP/STM322xG_EVAL
@@ -0,0 +1 @@
+Subproject commit ee9ca2e0219a1c9b480e526c3bb6781d287f5e60
diff --git a/Drivers/BSP/STM322xG_EVAL/LICENSE.md b/Drivers/BSP/STM322xG_EVAL/LICENSE.md
deleted file mode 100644
index e94b88c3..00000000
--- a/Drivers/BSP/STM322xG_EVAL/LICENSE.md
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright 2017 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.
\ No newline at end of file
diff --git a/Drivers/BSP/STM322xG_EVAL/README.md b/Drivers/BSP/STM322xG_EVAL/README.md
deleted file mode 100644
index 4acc0af8..00000000
--- a/Drivers/BSP/STM322xG_EVAL/README.md
+++ /dev/null
@@ -1,41 +0,0 @@
-# BSP STM322xG_EVAL Component
-
-
-
-## Overview
-
-**STM32Cube** is an STMicroelectronics original initiative to ease developers' life by reducing efforts, time and cost.
-
-**STM32Cube** covers the overall STM32 products portfolio. It includes a comprehensive embedded software platform delivered for each STM32 series.
- * The CMSIS modules (core and device) corresponding to the ARM(tm) core implemented in this STM32 product.
- * The STM32 HAL-LL drivers, an abstraction layer offering a set of APIs ensuring maximized portability across the STM32 portfolio.
- * The BSP drivers of each evaluation, demonstration or nucleo board provided for this STM32 series.
- * A consistent set of middleware libraries such as RTOS, USB, FatFS, graphics, touch sensing library...
- * A full set of software projects (basic examples, applications, and demonstrations) for each board provided for this STM32 series.
-
-Two models of publication are proposed for the STM32Cube embedded software:
- * The monolithic **MCU Package**: all STM32Cube software modules of one STM32 series are present (Drivers, Middleware, Projects, Utilities) in the repository (usual name **STM32Cubexx**, xx corresponding to the STM32 series).
- * The **MCU component**: each STM32Cube software module being part of the STM32Cube MCU Package, is delivered as an individual repository, allowing the user to select and get only the required software functions.
-
-## Description
-
-This **stm322xg-eval** MCU component repository is one element of the **STM32CubeF2** MCU embedded software package, providing the **STM322xG_EVAL** BSP BOARD component part.
-
-## Release note
-
-Details about the content of this release are available in the release note [here](https://htmlpreview.github.io/?https://github.com/STMicroelectronics/stm322xg-eval/blob/main/Release_Notes.html).
-
-## Compatibility information
-
-Below is the list of the BSP *component* drivers to be used with this BSP *board* driver. It is **crucial** that you use a consistent set of CMSIS - HAL - BSP versions, as mentioned in [this](https://htmlpreview.github.io/?https://github.com/STMicroelectronics/STM32CubeF2/blob/master/Release_Notes.html) release note.
-
-* [stm32-bsp-common](https://github.com/STMicroelectronics/stm32-bsp-common)
-* [stm32-cs43l22](https://github.com/STMicroelectronics/stm32-cs43l22)
-* [stm32-ili9320](https://github.com/STMicroelectronics/stm32-ili9320)
-* [stm32-ili9325](https://github.com/STMicroelectronics/stm32-ili9325)
-* [stm32-ov2640](https://github.com/STMicroelectronics/stm32-ov2640)
-* [stm32-stmpe811](https://github.com/STMicroelectronics/stm32-stmpe811)
-
-## Troubleshooting
-
-Please refer to the [CONTRIBUTING.md](CONTRIBUTING.md) guide.
diff --git a/Drivers/BSP/STM322xG_EVAL/Release_Notes.html b/Drivers/BSP/STM322xG_EVAL/Release_Notes.html
deleted file mode 100644
index 28d7af11..00000000
--- a/Drivers/BSP/STM322xG_EVAL/Release_Notes.html
+++ /dev/null
@@ -1,636 +0,0 @@
-
-
-
This directory contains the board drivers to demonstrate the capabilities of the STM322xG Evaluation Kit.
-
-
-
Update History
-
-
-
-
Main Changes
-
-
All source files: update disclaimer to add reference to the new license agreement.
-
-
-
-
-
-
-
Main Changes
-
-
Remove DATE and VERSION from header files
-
stm322xg_eval.c:
-
-
Implement I2C workaround to avoid misbehavior when pushing the reset button repetitively with LCD paint application
-
-
stm322xg_eval_lcd.c:
-
-
Fix LCD compilation errors with SW4STM32 toolchain
-
-
-
-
-
-
-
-
Main Changes
-
-
stm322xg_eval_sd.c/.h:
-
-
Update BSP SD APIs following new HAL SD drivers implementation
-
Fix BlockSize to 512 bytes
-
-
stm322xg_eval_audio.c/.h:
-
-
Add BSP_AUDIO_OUT_MspInit, BSP_AUDIO_OUT_MspDeInit and BSP_AUDIO_OUT_ClockConfig APIs as weak
-
Remove CODEC_Reset API
-
-
stm322xg_eval_sram.c/.h:
-
-
Add BSP_SRAM_MspInit API as weak
-
-
stm322xg_eval_camera.c/.h:
-
-
Add BSP_CAMERA_MspInit API as weak
-
-
Notes:
-
-
These BSP drivers break the compatibility with previous versions.
-
If FatFs is required, “FatFS R0.11 ST modified 20161223” must be used with this version of BSP drivers.
-
-
-
-
-
-
-
-
Main Changes
-
-
stm322xg_eval_camera.c update BSP Camera driver to use the new HAL DCMI API’s:
-
-
Update BSP_CAMERA_Suspend() API to call HAL_DCMI_Suspend() API
-
Update BSP_CAMERA_Resume to call HAL_DCMI_Resume() API
-
-
NVIC priorioty set to the lowest priority 0x0F
-
Fix SRAM timing values
-
Support of Potentiometer mounted on eval board
-
-
Add new API to initialize required peripherals (ADC, clock …)
-
Add new API to get voltage level
-
-
Update overall drivers by removing BSP_PPP_IRQHandler, BSP_PPP_DMA_TX_IRQHandler and BSP_PPP_DMA_RX_IRQHandler to avoid possible conflict when the same Handler is used by different IPs. These Handlers should be defined by user at application level, inducing a break of compatbility versus V6.2.0 of the STM322xG-EVAL BSP drivers
-
-
-
-
-
-
-
Main Changes
-
-
stm322xg_eval.c/.h
-
-
Update to support the new LCD components (ili9325 V1.2.2 and ili9325 V1.2.2) version
-
-
Add new API: LCD_IO_WriteMultipleData()
-
Update LCD_IO_ReadData() API prototype: add “RegValue” parameter
-
-
-
-
-
-
-
-
-
Main Changes
-
-
stm322xg_eval.c/.h
-
-
Change I2C_SPEED used define by BSP_I2C_SPEED
-
Add Audio_IO_DeInit() to support cs43l22 component V2.0.0
-
-
stm322g_eval_eeprom.c/.h
-
-
Change BSP_EEPROM_WaitEepromStandbyState() and BSP_EEPROM_WritePage() to be declared as static APIs
-
-
Align to STM32F2xx HAL V1.2.0 for __HAL_RCC_PPP_CLK_ENABLE()
-
Miscellaneous comments update
-
-
-
-
-
-
-
Main Changes
-
-
stm322xg_eval_camera.h, stm322xg_eval_audio.h, stm322xg_eval_io.h, stm322xg_eval_ts.h and stm322xg_eval_lcd.c/.h
-
-
Change “" by”/" in the include path to fix compilation issue under Linux
-
-
-
-
-
-
-
-
Main Changes
-
-
stm322xg_eval_lcd.c/.h
-
-
Integration of the LCD ili9320
-
-
-
-
-
-
-
-
Main Changes
-
-
This STM322xG_EVAL BSP is intended to be delivered with the STM32F2Cube FW package V1.0.0.
-
-
It is also aligned and consistent with the STM32F4Cube FW package V1.1.0
-
-
The following components have been integrated in this delivery
-
-
LCD : ili9325 (the ili9320 should be supported in a next release)
-
Camera : ov2640
-
Audio Codec : cs43L22
-
IO Expander : stmpe811 (required also for the Touch Screen function)
-
External SRAM : IS61WV1024
-
-
The overal content of the BSP is decribed below:
-
stm322xg_eval_sd.c/.h
-
Update SD_DATATIMEOUT value
-
stm322xg_eval_eeprom.c/.h
-
-
Update usage of BSP_EEPROM_TIMEOUT_UserCallback() function
-
-
Alignment to the coding rules and architecture of the BSP FW F4 v1.0.0
-
-
All external functions include a prefix BSP_
-
-
stm322xg_eval_camera.c/.h: driver functions for Camera module mounted on STM322xG-EVAL evaluation board
-
-
The OV2640 component must be included
-
BSP_CAMERA_Init()
-
BSP_CAMERA_ContinuousStart()
-
BSP_CAMERA_SnapshotStart()
-
BSP_CAMERA_Suspend()
-
BSP_CAMERA_Resume()
-
-
stm322xg_eval_audio.c/.h: This file provides the Audio driver for the STM322xG-EVAL evaluation board
-
-
The CS43L22 Audio Codec component must be used
-
BSP_AUDIO_OUT_Init()
-
BSP_AUDIO_OUT_Play()
-
BSP_AUDIO_OUT_Pause()
-
BSP_AUDIO_OUT_Resume()
-
BSP_AUDIO_OUT_Stop()
-
BSP_AUDIO_OUT_SetVolume()
-
BSP_AUIO_OUT_SetMute()
-
BSP_AUDIO_OUT_SetOutputMode()
-
-
stm322xg_eval_sram.c/.h: This file includes the SRAM driver for the IS61WV102416BLL memory device mounted on STM322xG-EVAL evaluation board
-
-
The IS61WV102416BLL memory device must be used
-
BSP_SRAM_Init()
-
BSP_SRAM_ReadData()
-
BSP_SRAM_ReadData_DMA()
-
BSP_SRAM_WriteData()
-
BSP_SRAM_WriteData_DMA()
-
-
stm322xg_eval_ioc.c/.h : This file provides a set of functions needed to manage the IO pins This file provides a set of functions needed to manage the IO pins
-
-
The STMPE811 IO expander device component driver must be included
-
BSP_IO_Init()
-
BSP_IO_ConfigPin()
-
BSP_IO_WritePin()
-
BSP_IO_ReadPin()
-
BSP_IO_TogglePin()
-
-
stm322xg_eval_lcd.c/.h : This file includes the driver for Liquid Crystal Display (LCD) module mounted on STM322xG-EVAL evaluation board.
-
-
The ILI9325 component driver MUST be included with this driver
-
Please refer to the file stm322xg_eval_lcd.h file to get the overall list of functions proposed by this driver
-
-
stm322xg_eval_sd.c/.h : This file includes the uSD card driver mounted on STM322xG-EVAL evaluation board
-
-
This driver does not need a specific component driver for the micro SD device
-
BSP_SD_Init()
-
BSP_SD_ITConfig()
-
BSP_SD_IsDetected()
-
BSP_SD_ReadBlocks()
-
BSP_SD_WriteBlocks()
-
BSP_SD_ReadBlocks_DMA()
-
BSP_SD_WriteBlocks_DMA()
-
BSP_SD_Erase()
-
-
stm322xg_eval_ts.c/.h : This file provides a set of functions needed to manage the touch screen on STM324x9I-EVAL evaluation board
-
-
The STMPE811 IO expander component must be used
-
BSP_TS_Init()
-
BSP_TS_ITConfig()
-
BSP_TS_ITGetState()
-
BSP_TS_ITGetStatus()
-
BSP_TS_ITClear()
-
-
stm322xg_eval.c/.h : new functions provided
-
-
Joystick management
-
FSMC Bank3 management
-
IO Expander IO functions
-
LCD IO functions
-
AUDIO IO functions
-
CAMERA IO functions
-
I2C functions
-
EEPROM functions
-
-
IMPORTANT NOTE: this version has to be used only with STM32CubeF2 based development
-
-
-
-
-
-
-
Main Changes
-
-
stm322xg_eval_ioe.c
-
-
Update the MEMS pins configuration in IOE_Config() function.
-
Update I2C communication sequence in I2C_ReadDataBuffer() function to ensure efficient and robust I2C transfer.
-
-
-
-
-
-
-
-
Main Changes
-
-
stm322xg_eval_sdio_sd.h/.c
-
-
Support SDHC memory cards with capacity greater than 4 GB
-
Transmit and receive functions: swap the order of state machine and DMA configuration, to fix marginal limitation where the card sent data to the SDIO interface while the DMA is not ready to transfer them
-
Support SDHS (High Speed) memory cards, add new function SD_HighSpeed()
-
-
stm322xg_eval_ioe.c
-
-
Configuration clean up and corrections
-
Touch screen (TSC) Interrupt mode enhancement
-
Update Read/Write low layer functions to ensure efficient and robust I2C transfer
-
-
Update legacy functions I2C_WriteDeviceRegister(), I2C_ReadDeviceRegister() and I2C_ReadDataBuffer() to use polling mode instead of DMA
-
Add three new functions I2C_DMA_WriteDeviceRegister(), I2C_DMA_ReadDeviceRegister() and I2C_DMA_ReadDataBuffer(), for DMA based I2C transfer
-
-
-
stm322xg_eval.c
-
-
SD_LowLevel_Init(): Set the GPIO clock to 50MHz to support High Speed mode
-
-
stm322xg_eval_i2c_ee.c
-
-
Enable I2C DMA request only after the enable of the DMA stream, to avoid DMA FIFO error generation
-
-
stm322xg_eval_fsmc_sram.c
-
-
Change memory type to SRAM instead of PSRAM (PSRAM is available only on STM322xG-EVAL RevA) and update timing values
-
-
-
-
-
-
-
-
Main Changes
-
-
All source files: license disclaimer text update and add link to the License file on ST Internet.
-
stm322xg_eval_lcd.c
-
-
Enhance Gamma Curve settings for ILI9320 controller
-
-
stm322xg_eval.c and stm322xg_eval_ioe.c
-
-
Swap the order of I2C IOs and alternate function (AF) configuration: AF configuration should be done before to configure the IOs.
-
-
stm322xg_eval_sdio_sd.c
-
-
In SD_WaitWriteOperation() and SD_WaitReadOperation() functions: reset StopCondition flag after sending CMD12
-
-
-
-
-
-
-
-
Main Changes
-
-
All source files: update disclaimer to add reference to the new license agreement
-
stm322xg_eval_lcd.c
-
-
Remove “static” from TextColor and BackColor variables declaration (need to be changed from other application modules)
-
-
stm322xg_eval_ioe.h
-
-
Add conditional compilation on the default DMA stream(s) used for I2C1 Tx and Rx transfers, to allow user to change them from application level.
-
-
-
-
-
-
-
-
Main Changes
-
-
stm322xg_eval_sdio_sd.h
-
-
SD_CardInfo structure, define CardCapacity variable as 64-bit long (instead of 32-bit) to support SDHC memory cards with capacity greater than 4 GB.
-
-
-
-
-
-
-
-
Main Changes
-
-
Update STM32 Evaluation Board Drivers architecture and folder organization, full API compatibility maintained vs. V4.6.2
-
-
All the HW drivers required for each board are provided within this board folder. The concerned drivers are:
-
These drivers were moved from to 32XXX_EVAL folder(s)
-
-
Common folder contains only drivers for the fonts and log module used by the LCD driver
-
stm32_eval.c/.h files removed, as consequence you need to perform the following update on your project configuration (based on EVAL drivers V4.6.2):
-
-
In the project files, add your EVAL board driver source file “stm322xg_eval.c” instead of “stm32_eval.c”
-
Include your EVAL board driver header file #include “stm322xg_eval.h” instead of #include “stm32_eval.h”
-
If you are using the EVAL board’s LCD, you need to add the include of the LCD header file #include “stm322xg_eval_lcd.h”
-
-
If you are using the LCD log module, after copying it to the application folder you have to edit it and update the name of the LCD header file. For more details, refer to the lcd_log_conf_template.h driver description.
-
-
-
stm322xg_eval.h/.c
-
-
change value of “SDIO_TRANSFER_CLK_DIV” define from 2 to 0 to achieve SD max frequency at 24MHz.
-
Remove SD_DMAEndOfTransferStatus() function as now the DMA transfer is tracked using DMA End of transfer interrupt.
-
Add new define for the SDIO’s DMA2 Stream (3 or 6): SD_SDIO_DMA_IRQn and SD_SDIO_DMA_IRQHANDLER.
-
-
stm322xg_eval_sdio_sd.h/.c
-
-
Add new function SD_ProcessDMAIRQ() to be called from the DMA end of transfer interrupt.
-
Add some improvements by handling SDIO errors and adding timeout for different loops.
-
Refer to the driver header file’s comments for more information on how to use the provided API.
-
-
stm322xg_eval_fsmc_sram.c
-
-
Add IOs config of missing FSMC address lines (FSMC_A21, FSMC_A22 and FSMC_A23).
-
-
-
-
-
-
-
-
-
Main Changes
-
-
STM3210C_EVAL
-
-
stm3210c_eval_lcd.c: update to support new LCD AM240320D5TOQW01H (controller ILI9325)
-
-
STM322xG-EVAL
-
-
stm322xg_eval.h: fix value of the SDIO clock divider (SDIO_TRANSFER_CLK_DIV constant) to 2 instead of 0
-
stm322xg_eval_lcd.c: increase FSMC AddressSetupTime value from 1 to 3 to be compliant with some LCD access timing
-
stm322xg_eval_audio_codec.c: update Codec_CtrlInterface_Init() and Codec_GPIO_Init() functions to not reconfigure the I2C peripheral if it’s already enabled and configured (to avoid configuring the I2C twice when using both Audio codec and IO Expander drivers in the same application).
-
-
-
-
-
-
-
-
Main Changes
-
-
Update some STM322xG_EVAL drivers (no change on the API) to fix warnings with TASKING C compiler.
-
Change the Release Notes name to STM32 Evaluation Board Drivers
-
stm322xg_eval.c
-
-
SD_LowLevel_Init(): change SDIO pins speed configuration to “GPIO_Speed_25MHz”
-
-
-
-
-
-
-
-
Main Changes
-
-
Official version supporting STM322xG_EVAL evaluation board RevB (for STM32F2xx devices).
-
Common
-
-
Add new LCD log utility drivers: The LCD Log module allows to automatically set a header and footer on any application using the LCD display and allows to dump user, debug and error messages by using the following macros: LCD_ErrLog(), LCD_UsrLog() and LCD_DbgLog().
-
-
Note: the STM322xG_EVAL board RevA was wrongly named STM3220F_EVAL
-
-
-
-
-
-
-
Main Changes
-
-
stm32_eval_sdio_sd.c.h: driver improvement
-
-
SD Clock increased to 24MHz to improve the data transfer performance.
-
Add new functions to check the SDIO peripheral and SD Card status at any time: SD_WaitReadOperation(), SD_WaitWriteOperation(). The software sequence is little bit changed but without any impact on driver API. For more details, refer to the stm32_eval_sdio_sd.c driver description.
-
Add new structure containing the SD Status register parameters. This structure is called by the SD_SendSDStatus() function.
-
Transfers mode updated
-
-
Read/Write Block using Polling and DMA modes
-
Read/Write Multi Blocks using DMA mode only
-
Interrupt mode removed
-
-
Data transfer functions are managing only fixed Block size (512-byte)
-
-
STM32100B-EVAL
-
-
stm32100b_eval_cec.c: fix some strict ANSI-C errors
-
-
STM32100E-EVAL
-
-
stm32100e_eval_cec.c: fix some strict ANSI-C errors
-
-
-
-
-
-
-
-
Main Changes
-
-
Add new directory for STM32L152-EVAL board containing the following files:
-
stm32_eval_sdio_sd.c: Update the DMA End of Transfer Check loop inside the SD_ReadBlock(), SD_WriteBlock(), SD_ReadMultiBlocks() and SD_Write MultiBlocks().
-
stm32_eval_i2c_ee.c/.h
-
-
Enhanced sEE_WaitEepromStandbyState() function for more robustness.
-
Enhanced Read and Write operations to manage I2C limitations.
-
Add Timeout management with user callback implementation which allows recovering from I2C bus errors.
-
Add critical sections user callbacks allowing to disable then enable interrupts when I2C operation require to be not interrupted.
-
-
stm32_eval_i2c_tsensor.c/.h
-
-
Enhanced I2C communication functions by using DMA for registers Read and Write operations.
-
Add Timeout management with user callback implementation which allows recovering from I2C bus errors.
-
-
-
STM32100B_EVAL
-
-
stm32100b_eval.h: Add LM75 DMA defines.
-
stm32100b_eval_lcd.c: Change “SPI_FLASH” by “sFLASH” in LCD_DrawBMP() function.
-
-
STM3210B_EVAL
-
-
stm3210b_eval.h: Add LM75 DMA defines.
-
stm3210b_eval_lcd.c: Change “SPI_FLASH” by “sFLASH” in LCD_DrawBMP() function.
stm3210e_eval_fsmc_nand.c: Update FSMC timing in NAND_Init() function to be aligned with AN2784 application note.
-
stm3210e_eval_fsmc_nor.c
-
-
NOR_Init() function: add FSMC_AsynchronousWait field to FSMC_NORSRAMInitStructure
-
-
stm3210e_eval_fsmc_sram.c
-
-
Update FSMC timing in SRAM_Init() function to be aligned with AN2784 application note.
-
SRAM_Init() function: add FSMC_AsynchronousWait field to FSMC_NORSRAMInitStructure
-
-
stm3210e_eval_lcd.c
-
-
LCD_FSMCConfig() function: add FSMC_AsynchronousWait field to FSMC_NORSRAMInitStructure
-
-
-
-
-
-
-
-
-
General
-
-
I2C EEPROM driver update to use the DMA to perform data transfer to/from EEPROM memory.
-
-
Utilities
-
-
STM32_EVAL
-
-
stm32_eval_i2c_ee.c: updated to use the DMA to perform data transfer to/from EEPROM memory. For more details, refer to the description provided within this file.
-
stm3210c_eval.c: add low level functions to configure the DMA (needed for I2C EEPROM driver)
-
stm3210c_eval_ioe.c: add a delay in IOE_TS_GetState() function to wait till the end of ADC conversion
-
stm3210e_eval_fsmc_nor.c: add PD6 pin configuration in NOR_Init() function
-
stm3210b_eval_lcd.c: remove the second “;” from “static void PutPixel(int16_t x, int16_t y);;”
-
-
-
-
-
-
-
-
General
-
-
Add support for STM32 Low-density Value line (STM32F100x4/6) and Medium-density Value line (STM32F100x8/B) devices.
-
Add support for the STMicroelectronics STM32100B-EVAL evaluation board.
-
-
Utilities
-
-
STM32_EVAL
-
-
Add new directory “Common” containing a common drivers for all STM32 evaluation boards: fonts.h/.c, stm32_eval_i2c_ee.h/.c, stm32_eval_spi_flash.h/.c, stm32_eval_i2c_tsensor.h/.c, stm32_eval_spi_sd.h/.c and stm32_eval_sdio_sd.h/.c
-
Add new driver for the STM32100B-EVAL managing Leds, push button and COM ports.
-
New HDMI CEC High level driver.
-
For all LCD drivers new fonts has been added.
-
New FSMC memories drivers for STM3210E-EVAL board: stm3210e_eval_fsmc_sram.h/.c, stm3210e_eval_fsmc_nor.h/.c and stm3210e_eval_fsmc_nand.h/.c.
-
-
-
-
-
-
-
-
-
diff --git a/Drivers/BSP/STM322xG_EVAL/_htmresc/favicon.png b/Drivers/BSP/STM322xG_EVAL/_htmresc/favicon.png
deleted file mode 100644
index 06713eec..00000000
Binary files a/Drivers/BSP/STM322xG_EVAL/_htmresc/favicon.png and /dev/null differ
diff --git a/Drivers/BSP/STM322xG_EVAL/_htmresc/mini-st_2020.css b/Drivers/BSP/STM322xG_EVAL/_htmresc/mini-st_2020.css
deleted file mode 100644
index 3d9e81ad..00000000
--- a/Drivers/BSP/STM322xG_EVAL/_htmresc/mini-st_2020.css
+++ /dev/null
@@ -1,1703 +0,0 @@
-@charset "UTF-8";
-/*
- Flavor name: Custom (mini-custom)
- Generated online - https://minicss.org/flavors
- mini.css version: v3.0.1
-*/
-/*
- Browsers resets and base typography.
-*/
-/* Core module CSS variable definitions */
-:root {
- --fore-color: #03234b;
- --secondary-fore-color: #03234b;
- --back-color: #ffffff;
- --secondary-back-color: #ffffff;
- --blockquote-color: #e6007e;
- --pre-color: #e6007e;
- --border-color: #3cb4e6;
- --secondary-border-color: #3cb4e6;
- --heading-ratio: 1.2;
- --universal-margin: 0.5rem;
- --universal-padding: 0.25rem;
- --universal-border-radius: 0.075rem;
- --background-margin: 1.5%;
- --a-link-color: #3cb4e6;
- --a-visited-color: #8c0078; }
-
-html {
- font-size: 13.5px; }
-
-a, b, del, em, i, ins, q, span, strong, u {
- font-size: 1em; }
-
-html, * {
- font-family: -apple-system, BlinkMacSystemFont, Helvetica, arial, sans-serif;
- line-height: 1.25;
- -webkit-text-size-adjust: 100%; }
-
-* {
- font-size: 1rem; }
-
-body {
- margin: 0;
- color: var(--fore-color);
- @background: var(--back-color);
- background: var(--back-color) linear-gradient(#ffd200, #ffd200) repeat-y left top;
- background-size: var(--background-margin);
- }
-
-details {
- display: block; }
-
-summary {
- display: list-item; }
-
-abbr[title] {
- border-bottom: none;
- text-decoration: underline dotted; }
-
-input {
- overflow: visible; }
-
-img {
- max-width: 100%;
- height: auto; }
-
-h1, h2, h3, h4, h5, h6 {
- line-height: 1.25;
- margin: calc(1.5 * var(--universal-margin)) var(--universal-margin);
- font-weight: 400; }
- h1 small, h2 small, h3 small, h4 small, h5 small, h6 small {
- color: var(--secondary-fore-color);
- display: block;
- margin-top: -0.25rem; }
-
-h1 {
- font-size: calc(1rem * var(--heading-ratio) * var(--heading-ratio) * var(--heading-ratio)); }
-
-h2 {
- font-size: calc(1rem * var(--heading-ratio) * var(--heading-ratio) );
- border-style: none none solid none ;
- border-width: thin;
- border-color: var(--border-color); }
-h3 {
- font-size: calc(1rem * var(--heading-ratio) ); }
-
-h4 {
- font-size: calc(1rem * var(--heading-ratio)); }
-
-h5 {
- font-size: 1rem; }
-
-h6 {
- font-size: calc(1rem / var(--heading-ratio)); }
-
-p {
- margin: var(--universal-margin); }
-
-ol, ul {
- margin: var(--universal-margin);
- padding-left: calc(3 * var(--universal-margin)); }
-
-b, strong {
- font-weight: 700; }
-
-hr {
- box-sizing: content-box;
- border: 0;
- line-height: 1.25em;
- margin: var(--universal-margin);
- height: 0.0714285714rem;
- background: linear-gradient(to right, transparent, var(--border-color) 20%, var(--border-color) 80%, transparent); }
-
-blockquote {
- display: block;
- position: relative;
- font-style: italic;
- color: var(--secondary-fore-color);
- margin: var(--universal-margin);
- padding: calc(3 * var(--universal-padding));
- border: 0.0714285714rem solid var(--secondary-border-color);
- border-left: 0.3rem solid var(--blockquote-color);
- border-radius: 0 var(--universal-border-radius) var(--universal-border-radius) 0; }
- blockquote:before {
- position: absolute;
- top: calc(0rem - var(--universal-padding));
- left: 0;
- font-family: sans-serif;
- font-size: 2rem;
- font-weight: 800;
- content: "\201c";
- color: var(--blockquote-color); }
- blockquote[cite]:after {
- font-style: normal;
- font-size: 0.75em;
- font-weight: 700;
- content: "\a— " attr(cite);
- white-space: pre; }
-
-code, kbd, pre, samp {
- font-family: Menlo, Consolas, monospace;
- font-size: 0.85em; }
-
-code {
- background: var(--secondary-back-color);
- border-radius: var(--universal-border-radius);
- padding: calc(var(--universal-padding) / 4) calc(var(--universal-padding) / 2); }
-
-kbd {
- background: var(--fore-color);
- color: var(--back-color);
- border-radius: var(--universal-border-radius);
- padding: calc(var(--universal-padding) / 4) calc(var(--universal-padding) / 2); }
-
-pre {
- overflow: auto;
- background: var(--secondary-back-color);
- padding: calc(1.5 * var(--universal-padding));
- margin: var(--universal-margin);
- border: 0.0714285714rem solid var(--secondary-border-color);
- border-left: 0.2857142857rem solid var(--pre-color);
- border-radius: 0 var(--universal-border-radius) var(--universal-border-radius) 0; }
-
-sup, sub, code, kbd {
- line-height: 0;
- position: relative;
- vertical-align: baseline; }
-
-small, sup, sub, figcaption {
- font-size: 0.75em; }
-
-sup {
- top: -0.5em; }
-
-sub {
- bottom: -0.25em; }
-
-figure {
- margin: var(--universal-margin); }
-
-figcaption {
- color: var(--secondary-fore-color); }
-
-a {
- text-decoration: none; }
- a:link {
- color: var(--a-link-color); }
- a:visited {
- color: var(--a-visited-color); }
- a:hover, a:focus {
- text-decoration: underline; }
-
-/*
- Definitions for the grid system, cards and containers.
-*/
-.container {
- margin: 0 auto;
- padding: 0 calc(1.5 * var(--universal-padding)); }
-
-.row {
- box-sizing: border-box;
- display: flex;
- flex: 0 1 auto;
- flex-flow: row wrap;
- margin: 0 0 0 var(--background-margin); }
-
-.col-sm,
-[class^='col-sm-'],
-[class^='col-sm-offset-'],
-.row[class*='cols-sm-'] > * {
- box-sizing: border-box;
- flex: 0 0 auto;
- padding: 0 calc(var(--universal-padding) / 2); }
-
-.col-sm,
-.row.cols-sm > * {
- max-width: 100%;
- flex-grow: 1;
- flex-basis: 0; }
-
-.col-sm-1,
-.row.cols-sm-1 > * {
- max-width: 8.3333333333%;
- flex-basis: 8.3333333333%; }
-
-.col-sm-offset-0 {
- margin-left: 0; }
-
-.col-sm-2,
-.row.cols-sm-2 > * {
- max-width: 16.6666666667%;
- flex-basis: 16.6666666667%; }
-
-.col-sm-offset-1 {
- margin-left: 8.3333333333%; }
-
-.col-sm-3,
-.row.cols-sm-3 > * {
- max-width: 25%;
- flex-basis: 25%; }
-
-.col-sm-offset-2 {
- margin-left: 16.6666666667%; }
-
-.col-sm-4,
-.row.cols-sm-4 > * {
- max-width: 33.3333333333%;
- flex-basis: 33.3333333333%; }
-
-.col-sm-offset-3 {
- margin-left: 25%; }
-
-.col-sm-5,
-.row.cols-sm-5 > * {
- max-width: 41.6666666667%;
- flex-basis: 41.6666666667%; }
-
-.col-sm-offset-4 {
- margin-left: 33.3333333333%; }
-
-.col-sm-6,
-.row.cols-sm-6 > * {
- max-width: 50%;
- flex-basis: 50%; }
-
-.col-sm-offset-5 {
- margin-left: 41.6666666667%; }
-
-.col-sm-7,
-.row.cols-sm-7 > * {
- max-width: 58.3333333333%;
- flex-basis: 58.3333333333%; }
-
-.col-sm-offset-6 {
- margin-left: 50%; }
-
-.col-sm-8,
-.row.cols-sm-8 > * {
- max-width: 66.6666666667%;
- flex-basis: 66.6666666667%; }
-
-.col-sm-offset-7 {
- margin-left: 58.3333333333%; }
-
-.col-sm-9,
-.row.cols-sm-9 > * {
- max-width: 75%;
- flex-basis: 75%; }
-
-.col-sm-offset-8 {
- margin-left: 66.6666666667%; }
-
-.col-sm-10,
-.row.cols-sm-10 > * {
- max-width: 83.3333333333%;
- flex-basis: 83.3333333333%; }
-
-.col-sm-offset-9 {
- margin-left: 75%; }
-
-.col-sm-11,
-.row.cols-sm-11 > * {
- max-width: 91.6666666667%;
- flex-basis: 91.6666666667%; }
-
-.col-sm-offset-10 {
- margin-left: 83.3333333333%; }
-
-.col-sm-12,
-.row.cols-sm-12 > * {
- max-width: 100%;
- flex-basis: 100%; }
-
-.col-sm-offset-11 {
- margin-left: 91.6666666667%; }
-
-.col-sm-normal {
- order: initial; }
-
-.col-sm-first {
- order: -999; }
-
-.col-sm-last {
- order: 999; }
-
-@media screen and (min-width: 500px) {
- .col-md,
- [class^='col-md-'],
- [class^='col-md-offset-'],
- .row[class*='cols-md-'] > * {
- box-sizing: border-box;
- flex: 0 0 auto;
- padding: 0 calc(var(--universal-padding) / 2); }
-
- .col-md,
- .row.cols-md > * {
- max-width: 100%;
- flex-grow: 1;
- flex-basis: 0; }
-
- .col-md-1,
- .row.cols-md-1 > * {
- max-width: 8.3333333333%;
- flex-basis: 8.3333333333%; }
-
- .col-md-offset-0 {
- margin-left: 0; }
-
- .col-md-2,
- .row.cols-md-2 > * {
- max-width: 16.6666666667%;
- flex-basis: 16.6666666667%; }
-
- .col-md-offset-1 {
- margin-left: 8.3333333333%; }
-
- .col-md-3,
- .row.cols-md-3 > * {
- max-width: 25%;
- flex-basis: 25%; }
-
- .col-md-offset-2 {
- margin-left: 16.6666666667%; }
-
- .col-md-4,
- .row.cols-md-4 > * {
- max-width: 33.3333333333%;
- flex-basis: 33.3333333333%; }
-
- .col-md-offset-3 {
- margin-left: 25%; }
-
- .col-md-5,
- .row.cols-md-5 > * {
- max-width: 41.6666666667%;
- flex-basis: 41.6666666667%; }
-
- .col-md-offset-4 {
- margin-left: 33.3333333333%; }
-
- .col-md-6,
- .row.cols-md-6 > * {
- max-width: 50%;
- flex-basis: 50%; }
-
- .col-md-offset-5 {
- margin-left: 41.6666666667%; }
-
- .col-md-7,
- .row.cols-md-7 > * {
- max-width: 58.3333333333%;
- flex-basis: 58.3333333333%; }
-
- .col-md-offset-6 {
- margin-left: 50%; }
-
- .col-md-8,
- .row.cols-md-8 > * {
- max-width: 66.6666666667%;
- flex-basis: 66.6666666667%; }
-
- .col-md-offset-7 {
- margin-left: 58.3333333333%; }
-
- .col-md-9,
- .row.cols-md-9 > * {
- max-width: 75%;
- flex-basis: 75%; }
-
- .col-md-offset-8 {
- margin-left: 66.6666666667%; }
-
- .col-md-10,
- .row.cols-md-10 > * {
- max-width: 83.3333333333%;
- flex-basis: 83.3333333333%; }
-
- .col-md-offset-9 {
- margin-left: 75%; }
-
- .col-md-11,
- .row.cols-md-11 > * {
- max-width: 91.6666666667%;
- flex-basis: 91.6666666667%; }
-
- .col-md-offset-10 {
- margin-left: 83.3333333333%; }
-
- .col-md-12,
- .row.cols-md-12 > * {
- max-width: 100%;
- flex-basis: 100%; }
-
- .col-md-offset-11 {
- margin-left: 91.6666666667%; }
-
- .col-md-normal {
- order: initial; }
-
- .col-md-first {
- order: -999; }
-
- .col-md-last {
- order: 999; } }
-@media screen and (min-width: 1280px) {
- .col-lg,
- [class^='col-lg-'],
- [class^='col-lg-offset-'],
- .row[class*='cols-lg-'] > * {
- box-sizing: border-box;
- flex: 0 0 auto;
- padding: 0 calc(var(--universal-padding) / 2); }
-
- .col-lg,
- .row.cols-lg > * {
- max-width: 100%;
- flex-grow: 1;
- flex-basis: 0; }
-
- .col-lg-1,
- .row.cols-lg-1 > * {
- max-width: 8.3333333333%;
- flex-basis: 8.3333333333%; }
-
- .col-lg-offset-0 {
- margin-left: 0; }
-
- .col-lg-2,
- .row.cols-lg-2 > * {
- max-width: 16.6666666667%;
- flex-basis: 16.6666666667%; }
-
- .col-lg-offset-1 {
- margin-left: 8.3333333333%; }
-
- .col-lg-3,
- .row.cols-lg-3 > * {
- max-width: 25%;
- flex-basis: 25%; }
-
- .col-lg-offset-2 {
- margin-left: 16.6666666667%; }
-
- .col-lg-4,
- .row.cols-lg-4 > * {
- max-width: 33.3333333333%;
- flex-basis: 33.3333333333%; }
-
- .col-lg-offset-3 {
- margin-left: 25%; }
-
- .col-lg-5,
- .row.cols-lg-5 > * {
- max-width: 41.6666666667%;
- flex-basis: 41.6666666667%; }
-
- .col-lg-offset-4 {
- margin-left: 33.3333333333%; }
-
- .col-lg-6,
- .row.cols-lg-6 > * {
- max-width: 50%;
- flex-basis: 50%; }
-
- .col-lg-offset-5 {
- margin-left: 41.6666666667%; }
-
- .col-lg-7,
- .row.cols-lg-7 > * {
- max-width: 58.3333333333%;
- flex-basis: 58.3333333333%; }
-
- .col-lg-offset-6 {
- margin-left: 50%; }
-
- .col-lg-8,
- .row.cols-lg-8 > * {
- max-width: 66.6666666667%;
- flex-basis: 66.6666666667%; }
-
- .col-lg-offset-7 {
- margin-left: 58.3333333333%; }
-
- .col-lg-9,
- .row.cols-lg-9 > * {
- max-width: 75%;
- flex-basis: 75%; }
-
- .col-lg-offset-8 {
- margin-left: 66.6666666667%; }
-
- .col-lg-10,
- .row.cols-lg-10 > * {
- max-width: 83.3333333333%;
- flex-basis: 83.3333333333%; }
-
- .col-lg-offset-9 {
- margin-left: 75%; }
-
- .col-lg-11,
- .row.cols-lg-11 > * {
- max-width: 91.6666666667%;
- flex-basis: 91.6666666667%; }
-
- .col-lg-offset-10 {
- margin-left: 83.3333333333%; }
-
- .col-lg-12,
- .row.cols-lg-12 > * {
- max-width: 100%;
- flex-basis: 100%; }
-
- .col-lg-offset-11 {
- margin-left: 91.6666666667%; }
-
- .col-lg-normal {
- order: initial; }
-
- .col-lg-first {
- order: -999; }
-
- .col-lg-last {
- order: 999; } }
-/* Card component CSS variable definitions */
-:root {
- --card-back-color: #3cb4e6;
- --card-fore-color: #03234b;
- --card-border-color: #03234b; }
-
-.card {
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- align-self: center;
- position: relative;
- width: 100%;
- background: var(--card-back-color);
- color: var(--card-fore-color);
- border: 0.0714285714rem solid var(--card-border-color);
- border-radius: var(--universal-border-radius);
- margin: var(--universal-margin);
- overflow: hidden; }
- @media screen and (min-width: 320px) {
- .card {
- max-width: 320px; } }
- .card > .sectione {
- background: var(--card-back-color);
- color: var(--card-fore-color);
- box-sizing: border-box;
- margin: 0;
- border: 0;
- border-radius: 0;
- border-bottom: 0.0714285714rem solid var(--card-border-color);
- padding: var(--universal-padding);
- width: 100%; }
- .card > .sectione.media {
- height: 200px;
- padding: 0;
- -o-object-fit: cover;
- object-fit: cover; }
- .card > .sectione:last-child {
- border-bottom: 0; }
-
-/*
- Custom elements for card elements.
-*/
-@media screen and (min-width: 240px) {
- .card.small {
- max-width: 240px; } }
-@media screen and (min-width: 480px) {
- .card.large {
- max-width: 480px; } }
-.card.fluid {
- max-width: 100%;
- width: auto; }
-
-.card.warning {
- --card-back-color: #e5b8b7;
- --card-fore-color: #3b234b;
- --card-border-color: #8c0078; }
-
-.card.error {
- --card-back-color: #464650;
- --card-fore-color: #ffffff;
- --card-border-color: #8c0078; }
-
-.card > .sectione.dark {
- --card-back-color: #3b234b;
- --card-fore-color: #ffffff; }
-
-.card > .sectione.double-padded {
- padding: calc(1.5 * var(--universal-padding)); }
-
-/*
- Definitions for forms and input elements.
-*/
-/* Input_control module CSS variable definitions */
-:root {
- --form-back-color: #ffe97f;
- --form-fore-color: #03234b;
- --form-border-color: #3cb4e6;
- --input-back-color: #ffffff;
- --input-fore-color: #03234b;
- --input-border-color: #3cb4e6;
- --input-focus-color: #0288d1;
- --input-invalid-color: #d32f2f;
- --button-back-color: #e2e2e2;
- --button-hover-back-color: #dcdcdc;
- --button-fore-color: #212121;
- --button-border-color: transparent;
- --button-hover-border-color: transparent;
- --button-group-border-color: rgba(124, 124, 124, 0.54); }
-
-form {
- background: var(--form-back-color);
- color: var(--form-fore-color);
- border: 0.0714285714rem solid var(--form-border-color);
- border-radius: var(--universal-border-radius);
- margin: var(--universal-margin);
- padding: calc(2 * var(--universal-padding)) var(--universal-padding); }
-
-fieldset {
- border: 0.0714285714rem solid var(--form-border-color);
- border-radius: var(--universal-border-radius);
- margin: calc(var(--universal-margin) / 4);
- padding: var(--universal-padding); }
-
-legend {
- box-sizing: border-box;
- display: table;
- max-width: 100%;
- white-space: normal;
- font-weight: 500;
- padding: calc(var(--universal-padding) / 2); }
-
-label {
- padding: calc(var(--universal-padding) / 2) var(--universal-padding); }
-
-.input-group {
- display: inline-block; }
- .input-group.fluid {
- display: flex;
- align-items: center;
- justify-content: center; }
- .input-group.fluid > input {
- max-width: 100%;
- flex-grow: 1;
- flex-basis: 0px; }
- @media screen and (max-width: 499px) {
- .input-group.fluid {
- align-items: stretch;
- flex-direction: column; } }
- .input-group.vertical {
- display: flex;
- align-items: stretch;
- flex-direction: column; }
- .input-group.vertical > input {
- max-width: 100%;
- flex-grow: 1;
- flex-basis: 0px; }
-
-[type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button {
- height: auto; }
-
-[type="search"] {
- -webkit-appearance: textfield;
- outline-offset: -2px; }
-
-[type="search"]::-webkit-search-cancel-button,
-[type="search"]::-webkit-search-decoration {
- -webkit-appearance: none; }
-
-input:not([type]), [type="text"], [type="email"], [type="number"], [type="search"],
-[type="password"], [type="url"], [type="tel"], [type="checkbox"], [type="radio"], textarea, select {
- box-sizing: border-box;
- background: var(--input-back-color);
- color: var(--input-fore-color);
- border: 0.0714285714rem solid var(--input-border-color);
- border-radius: var(--universal-border-radius);
- margin: calc(var(--universal-margin) / 2);
- padding: var(--universal-padding) calc(1.5 * var(--universal-padding)); }
-
-input:not([type="button"]):not([type="submit"]):not([type="reset"]):hover, input:not([type="button"]):not([type="submit"]):not([type="reset"]):focus, textarea:hover, textarea:focus, select:hover, select:focus {
- border-color: var(--input-focus-color);
- box-shadow: none; }
-input:not([type="button"]):not([type="submit"]):not([type="reset"]):invalid, input:not([type="button"]):not([type="submit"]):not([type="reset"]):focus:invalid, textarea:invalid, textarea:focus:invalid, select:invalid, select:focus:invalid {
- border-color: var(--input-invalid-color);
- box-shadow: none; }
-input:not([type="button"]):not([type="submit"]):not([type="reset"])[readonly], textarea[readonly], select[readonly] {
- background: var(--secondary-back-color); }
-
-select {
- max-width: 100%; }
-
-option {
- overflow: hidden;
- text-overflow: ellipsis; }
-
-[type="checkbox"], [type="radio"] {
- -webkit-appearance: none;
- -moz-appearance: none;
- appearance: none;
- position: relative;
- height: calc(1rem + var(--universal-padding) / 2);
- width: calc(1rem + var(--universal-padding) / 2);
- vertical-align: text-bottom;
- padding: 0;
- flex-basis: calc(1rem + var(--universal-padding) / 2) !important;
- flex-grow: 0 !important; }
- [type="checkbox"]:checked:before, [type="radio"]:checked:before {
- position: absolute; }
-
-[type="checkbox"]:checked:before {
- content: '\2713';
- font-family: sans-serif;
- font-size: calc(1rem + var(--universal-padding) / 2);
- top: calc(0rem - var(--universal-padding));
- left: calc(var(--universal-padding) / 4); }
-
-[type="radio"] {
- border-radius: 100%; }
- [type="radio"]:checked:before {
- border-radius: 100%;
- content: '';
- top: calc(0.0714285714rem + var(--universal-padding) / 2);
- left: calc(0.0714285714rem + var(--universal-padding) / 2);
- background: var(--input-fore-color);
- width: 0.5rem;
- height: 0.5rem; }
-
-:placeholder-shown {
- color: var(--input-fore-color); }
-
-::-ms-placeholder {
- color: var(--input-fore-color);
- opacity: 0.54; }
-
-button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner {
- border-style: none;
- padding: 0; }
-
-button, html [type="button"], [type="reset"], [type="submit"] {
- -webkit-appearance: button; }
-
-button {
- overflow: visible;
- text-transform: none; }
-
-button, [type="button"], [type="submit"], [type="reset"],
-a.button, label.button, .button,
-a[role="button"], label[role="button"], [role="button"] {
- display: inline-block;
- background: var(--button-back-color);
- color: var(--button-fore-color);
- border: 0.0714285714rem solid var(--button-border-color);
- border-radius: var(--universal-border-radius);
- padding: var(--universal-padding) calc(1.5 * var(--universal-padding));
- margin: var(--universal-margin);
- text-decoration: none;
- cursor: pointer;
- transition: background 0.3s; }
- button:hover, button:focus, [type="button"]:hover, [type="button"]:focus, [type="submit"]:hover, [type="submit"]:focus, [type="reset"]:hover, [type="reset"]:focus,
- a.button:hover,
- a.button:focus, label.button:hover, label.button:focus, .button:hover, .button:focus,
- a[role="button"]:hover,
- a[role="button"]:focus, label[role="button"]:hover, label[role="button"]:focus, [role="button"]:hover, [role="button"]:focus {
- background: var(--button-hover-back-color);
- border-color: var(--button-hover-border-color); }
-
-input:disabled, input[disabled], textarea:disabled, textarea[disabled], select:disabled, select[disabled], button:disabled, button[disabled], .button:disabled, .button[disabled], [role="button"]:disabled, [role="button"][disabled] {
- cursor: not-allowed;
- opacity: 0.75; }
-
-.button-group {
- display: flex;
- border: 0.0714285714rem solid var(--button-group-border-color);
- border-radius: var(--universal-border-radius);
- margin: var(--universal-margin); }
- .button-group > button, .button-group [type="button"], .button-group > [type="submit"], .button-group > [type="reset"], .button-group > .button, .button-group > [role="button"] {
- margin: 0;
- max-width: 100%;
- flex: 1 1 auto;
- text-align: center;
- border: 0;
- border-radius: 0;
- box-shadow: none; }
- .button-group > :not(:first-child) {
- border-left: 0.0714285714rem solid var(--button-group-border-color); }
- @media screen and (max-width: 499px) {
- .button-group {
- flex-direction: column; }
- .button-group > :not(:first-child) {
- border: 0;
- border-top: 0.0714285714rem solid var(--button-group-border-color); } }
-
-/*
- Custom elements for forms and input elements.
-*/
-button.primary, [type="button"].primary, [type="submit"].primary, [type="reset"].primary, .button.primary, [role="button"].primary {
- --button-back-color: #1976d2;
- --button-fore-color: #f8f8f8; }
- button.primary:hover, button.primary:focus, [type="button"].primary:hover, [type="button"].primary:focus, [type="submit"].primary:hover, [type="submit"].primary:focus, [type="reset"].primary:hover, [type="reset"].primary:focus, .button.primary:hover, .button.primary:focus, [role="button"].primary:hover, [role="button"].primary:focus {
- --button-hover-back-color: #1565c0; }
-
-button.secondary, [type="button"].secondary, [type="submit"].secondary, [type="reset"].secondary, .button.secondary, [role="button"].secondary {
- --button-back-color: #d32f2f;
- --button-fore-color: #f8f8f8; }
- button.secondary:hover, button.secondary:focus, [type="button"].secondary:hover, [type="button"].secondary:focus, [type="submit"].secondary:hover, [type="submit"].secondary:focus, [type="reset"].secondary:hover, [type="reset"].secondary:focus, .button.secondary:hover, .button.secondary:focus, [role="button"].secondary:hover, [role="button"].secondary:focus {
- --button-hover-back-color: #c62828; }
-
-button.tertiary, [type="button"].tertiary, [type="submit"].tertiary, [type="reset"].tertiary, .button.tertiary, [role="button"].tertiary {
- --button-back-color: #308732;
- --button-fore-color: #f8f8f8; }
- button.tertiary:hover, button.tertiary:focus, [type="button"].tertiary:hover, [type="button"].tertiary:focus, [type="submit"].tertiary:hover, [type="submit"].tertiary:focus, [type="reset"].tertiary:hover, [type="reset"].tertiary:focus, .button.tertiary:hover, .button.tertiary:focus, [role="button"].tertiary:hover, [role="button"].tertiary:focus {
- --button-hover-back-color: #277529; }
-
-button.inverse, [type="button"].inverse, [type="submit"].inverse, [type="reset"].inverse, .button.inverse, [role="button"].inverse {
- --button-back-color: #212121;
- --button-fore-color: #f8f8f8; }
- button.inverse:hover, button.inverse:focus, [type="button"].inverse:hover, [type="button"].inverse:focus, [type="submit"].inverse:hover, [type="submit"].inverse:focus, [type="reset"].inverse:hover, [type="reset"].inverse:focus, .button.inverse:hover, .button.inverse:focus, [role="button"].inverse:hover, [role="button"].inverse:focus {
- --button-hover-back-color: #111; }
-
-button.small, [type="button"].small, [type="submit"].small, [type="reset"].small, .button.small, [role="button"].small {
- padding: calc(0.5 * var(--universal-padding)) calc(0.75 * var(--universal-padding));
- margin: var(--universal-margin); }
-
-button.large, [type="button"].large, [type="submit"].large, [type="reset"].large, .button.large, [role="button"].large {
- padding: calc(1.5 * var(--universal-padding)) calc(2 * var(--universal-padding));
- margin: var(--universal-margin); }
-
-/*
- Definitions for navigation elements.
-*/
-/* Navigation module CSS variable definitions */
-:root {
- --header-back-color: #03234b;
- --header-hover-back-color: #ffd200;
- --header-fore-color: #ffffff;
- --header-border-color: #3cb4e6;
- --nav-back-color: #ffffff;
- --nav-hover-back-color: #ffe97f;
- --nav-fore-color: #e6007e;
- --nav-border-color: #3cb4e6;
- --nav-link-color: #3cb4e6;
- --footer-fore-color: #ffffff;
- --footer-back-color: #03234b;
- --footer-border-color: #3cb4e6;
- --footer-link-color: #3cb4e6;
- --drawer-back-color: #ffffff;
- --drawer-hover-back-color: #ffe97f;
- --drawer-border-color: #3cb4e6;
- --drawer-close-color: #e6007e; }
-
-header {
- height: 2.75rem;
- background: var(--header-back-color);
- color: var(--header-fore-color);
- border-bottom: 0.0714285714rem solid var(--header-border-color);
- padding: calc(var(--universal-padding) / 4) 0;
- white-space: nowrap;
- overflow-x: auto;
- overflow-y: hidden; }
- header.row {
- box-sizing: content-box; }
- header .logo {
- color: var(--header-fore-color);
- font-size: 1.75rem;
- padding: var(--universal-padding) calc(2 * var(--universal-padding));
- text-decoration: none; }
- header button, header [type="button"], header .button, header [role="button"] {
- box-sizing: border-box;
- position: relative;
- top: calc(0rem - var(--universal-padding) / 4);
- height: calc(3.1875rem + var(--universal-padding) / 2);
- background: var(--header-back-color);
- line-height: calc(3.1875rem - var(--universal-padding) * 1.5);
- text-align: center;
- color: var(--header-fore-color);
- border: 0;
- border-radius: 0;
- margin: 0;
- text-transform: uppercase; }
- header button:hover, header button:focus, header [type="button"]:hover, header [type="button"]:focus, header .button:hover, header .button:focus, header [role="button"]:hover, header [role="button"]:focus {
- background: var(--header-hover-back-color); }
-
-nav {
- background: var(--nav-back-color);
- color: var(--nav-fore-color);
- border: 0.0714285714rem solid var(--nav-border-color);
- border-radius: var(--universal-border-radius);
- margin: var(--universal-margin); }
- nav * {
- padding: var(--universal-padding) calc(1.5 * var(--universal-padding)); }
- nav a, nav a:visited {
- display: block;
- color: var(--nav-link-color);
- border-radius: var(--universal-border-radius);
- transition: background 0.3s; }
- nav a:hover, nav a:focus, nav a:visited:hover, nav a:visited:focus {
- text-decoration: none;
- background: var(--nav-hover-back-color); }
- nav .sublink-1 {
- position: relative;
- margin-left: calc(2 * var(--universal-padding)); }
- nav .sublink-1:before {
- position: absolute;
- left: calc(var(--universal-padding) - 1 * var(--universal-padding));
- top: -0.0714285714rem;
- content: '';
- height: 100%;
- border: 0.0714285714rem solid var(--nav-border-color);
- border-left: 0; }
- nav .sublink-2 {
- position: relative;
- margin-left: calc(4 * var(--universal-padding)); }
- nav .sublink-2:before {
- position: absolute;
- left: calc(var(--universal-padding) - 3 * var(--universal-padding));
- top: -0.0714285714rem;
- content: '';
- height: 100%;
- border: 0.0714285714rem solid var(--nav-border-color);
- border-left: 0; }
-
-footer {
- background: var(--footer-back-color);
- color: var(--footer-fore-color);
- border-top: 0.0714285714rem solid var(--footer-border-color);
- padding: calc(2 * var(--universal-padding)) var(--universal-padding);
- font-size: 0.875rem; }
- footer a, footer a:visited {
- color: var(--footer-link-color); }
-
-header.sticky {
- position: -webkit-sticky;
- position: sticky;
- z-index: 1101;
- top: 0; }
-
-footer.sticky {
- position: -webkit-sticky;
- position: sticky;
- z-index: 1101;
- bottom: 0; }
-
-.drawer-toggle:before {
- display: inline-block;
- position: relative;
- vertical-align: bottom;
- content: '\00a0\2261\00a0';
- font-family: sans-serif;
- font-size: 1.5em; }
-@media screen and (min-width: 500px) {
- .drawer-toggle:not(.persistent) {
- display: none; } }
-
-[type="checkbox"].drawer {
- height: 1px;
- width: 1px;
- margin: -1px;
- overflow: hidden;
- position: absolute;
- clip: rect(0 0 0 0);
- -webkit-clip-path: inset(100%);
- clip-path: inset(100%); }
- [type="checkbox"].drawer + * {
- display: block;
- box-sizing: border-box;
- position: fixed;
- top: 0;
- width: 320px;
- height: 100vh;
- overflow-y: auto;
- background: var(--drawer-back-color);
- border: 0.0714285714rem solid var(--drawer-border-color);
- border-radius: 0;
- margin: 0;
- z-index: 1110;
- right: -320px;
- transition: right 0.3s; }
- [type="checkbox"].drawer + * .drawer-close {
- position: absolute;
- top: var(--universal-margin);
- right: var(--universal-margin);
- z-index: 1111;
- width: 2rem;
- height: 2rem;
- border-radius: var(--universal-border-radius);
- padding: var(--universal-padding);
- margin: 0;
- cursor: pointer;
- transition: background 0.3s; }
- [type="checkbox"].drawer + * .drawer-close:before {
- display: block;
- content: '\00D7';
- color: var(--drawer-close-color);
- position: relative;
- font-family: sans-serif;
- font-size: 2rem;
- line-height: 1;
- text-align: center; }
- [type="checkbox"].drawer + * .drawer-close:hover, [type="checkbox"].drawer + * .drawer-close:focus {
- background: var(--drawer-hover-back-color); }
- @media screen and (max-width: 320px) {
- [type="checkbox"].drawer + * {
- width: 100%; } }
- [type="checkbox"].drawer:checked + * {
- right: 0; }
- @media screen and (min-width: 500px) {
- [type="checkbox"].drawer:not(.persistent) + * {
- position: static;
- height: 100%;
- z-index: 1100; }
- [type="checkbox"].drawer:not(.persistent) + * .drawer-close {
- display: none; } }
-
-/*
- Definitions for the responsive table component.
-*/
-/* Table module CSS variable definitions. */
-:root {
- --table-border-color: #03234b;
- --table-border-separator-color: #03234b;
- --table-head-back-color: #03234b;
- --table-head-fore-color: #ffffff;
- --table-body-back-color: #ffffff;
- --table-body-fore-color: #03234b;
- --table-body-alt-back-color: #f4f4f4; }
-
-table {
- border-collapse: separate;
- border-spacing: 0;
- margin: 0;
- display: flex;
- flex: 0 1 auto;
- flex-flow: row wrap;
- padding: var(--universal-padding);
- padding-top: 0; }
- table caption {
- font-size: 1rem;
- margin: calc(2 * var(--universal-margin)) 0;
- max-width: 100%;
- flex: 0 0 100%; }
- table thead, table tbody {
- display: flex;
- flex-flow: row wrap;
- border: 0.0714285714rem solid var(--table-border-color); }
- table thead {
- z-index: 999;
- border-radius: var(--universal-border-radius) var(--universal-border-radius) 0 0;
- border-bottom: 0.0714285714rem solid var(--table-border-separator-color); }
- table tbody {
- border-top: 0;
- margin-top: calc(0 - var(--universal-margin));
- border-radius: 0 0 var(--universal-border-radius) var(--universal-border-radius); }
- table tr {
- display: flex;
- padding: 0; }
- table th, table td {
- padding: calc(0.5 * var(--universal-padding));
- font-size: 0.9rem; }
- table th {
- text-align: left;
- background: var(--table-head-back-color);
- color: var(--table-head-fore-color); }
- table td {
- background: var(--table-body-back-color);
- color: var(--table-body-fore-color);
- border-top: 0.0714285714rem solid var(--table-border-color); }
-
-table:not(.horizontal) {
- overflow: auto;
- max-height: 100%; }
- table:not(.horizontal) thead, table:not(.horizontal) tbody {
- max-width: 100%;
- flex: 0 0 100%; }
- table:not(.horizontal) tr {
- flex-flow: row wrap;
- flex: 0 0 100%; }
- table:not(.horizontal) th, table:not(.horizontal) td {
- flex: 1 0 0%;
- overflow: hidden;
- text-overflow: ellipsis; }
- table:not(.horizontal) thead {
- position: sticky;
- top: 0; }
- table:not(.horizontal) tbody tr:first-child td {
- border-top: 0; }
-
-table.horizontal {
- border: 0; }
- table.horizontal thead, table.horizontal tbody {
- border: 0;
- flex: .2 0 0;
- flex-flow: row nowrap; }
- table.horizontal tbody {
- overflow: auto;
- justify-content: space-between;
- flex: .8 0 0;
- margin-left: 0;
- padding-bottom: calc(var(--universal-padding) / 4); }
- table.horizontal tr {
- flex-direction: column;
- flex: 1 0 auto; }
- table.horizontal th, table.horizontal td {
- width: auto;
- border: 0;
- border-bottom: 0.0714285714rem solid var(--table-border-color); }
- table.horizontal th:not(:first-child), table.horizontal td:not(:first-child) {
- border-top: 0; }
- table.horizontal th {
- text-align: right;
- border-left: 0.0714285714rem solid var(--table-border-color);
- border-right: 0.0714285714rem solid var(--table-border-separator-color); }
- table.horizontal thead tr:first-child {
- padding-left: 0; }
- table.horizontal th:first-child, table.horizontal td:first-child {
- border-top: 0.0714285714rem solid var(--table-border-color); }
- table.horizontal tbody tr:last-child td {
- border-right: 0.0714285714rem solid var(--table-border-color); }
- table.horizontal tbody tr:last-child td:first-child {
- border-top-right-radius: 0.25rem; }
- table.horizontal tbody tr:last-child td:last-child {
- border-bottom-right-radius: 0.25rem; }
- table.horizontal thead tr:first-child th:first-child {
- border-top-left-radius: 0.25rem; }
- table.horizontal thead tr:first-child th:last-child {
- border-bottom-left-radius: 0.25rem; }
-
-@media screen and (max-width: 499px) {
- table, table.horizontal {
- border-collapse: collapse;
- border: 0;
- width: 100%;
- display: table; }
- table thead, table th, table.horizontal thead, table.horizontal th {
- border: 0;
- height: 1px;
- width: 1px;
- margin: -1px;
- overflow: hidden;
- padding: 0;
- position: absolute;
- clip: rect(0 0 0 0);
- -webkit-clip-path: inset(100%);
- clip-path: inset(100%); }
- table tbody, table.horizontal tbody {
- border: 0;
- display: table-row-group; }
- table tr, table.horizontal tr {
- display: block;
- border: 0.0714285714rem solid var(--table-border-color);
- border-radius: var(--universal-border-radius);
- background: #ffffff;
- padding: var(--universal-padding);
- margin: var(--universal-margin);
- margin-bottom: calc(1 * var(--universal-margin)); }
- table th, table td, table.horizontal th, table.horizontal td {
- width: auto; }
- table td, table.horizontal td {
- display: block;
- border: 0;
- text-align: right; }
- table td:before, table.horizontal td:before {
- content: attr(data-label);
- float: left;
- font-weight: 600; }
- table th:first-child, table td:first-child, table.horizontal th:first-child, table.horizontal td:first-child {
- border-top: 0; }
- table tbody tr:last-child td, table.horizontal tbody tr:last-child td {
- border-right: 0; } }
-table tr:nth-of-type(2n) > td {
- background: var(--table-body-alt-back-color); }
-
-@media screen and (max-width: 500px) {
- table tr:nth-of-type(2n) {
- background: var(--table-body-alt-back-color); } }
-:root {
- --table-body-hover-back-color: #90caf9; }
-
-table.hoverable tr:hover, table.hoverable tr:hover > td, table.hoverable tr:focus, table.hoverable tr:focus > td {
- background: var(--table-body-hover-back-color); }
-
-@media screen and (max-width: 500px) {
- table.hoverable tr:hover, table.hoverable tr:hover > td, table.hoverable tr:focus, table.hoverable tr:focus > td {
- background: var(--table-body-hover-back-color); } }
-/*
- Definitions for contextual background elements, toasts and tooltips.
-*/
-/* Contextual module CSS variable definitions */
-:root {
- --mark-back-color: #3cb4e6;
- --mark-fore-color: #ffffff; }
-
-mark {
- background: var(--mark-back-color);
- color: var(--mark-fore-color);
- font-size: 0.95em;
- line-height: 1em;
- border-radius: var(--universal-border-radius);
- padding: calc(var(--universal-padding) / 4) var(--universal-padding); }
- mark.inline-block {
- display: inline-block;
- font-size: 1em;
- line-height: 1.4;
- padding: calc(var(--universal-padding) / 2) var(--universal-padding); }
-
-:root {
- --toast-back-color: #424242;
- --toast-fore-color: #fafafa; }
-
-.toast {
- position: fixed;
- bottom: calc(var(--universal-margin) * 3);
- left: 50%;
- transform: translate(-50%, -50%);
- z-index: 1111;
- color: var(--toast-fore-color);
- background: var(--toast-back-color);
- border-radius: calc(var(--universal-border-radius) * 16);
- padding: var(--universal-padding) calc(var(--universal-padding) * 3); }
-
-:root {
- --tooltip-back-color: #212121;
- --tooltip-fore-color: #fafafa; }
-
-.tooltip {
- position: relative;
- display: inline-block; }
- .tooltip:before, .tooltip:after {
- position: absolute;
- opacity: 0;
- clip: rect(0 0 0 0);
- -webkit-clip-path: inset(100%);
- clip-path: inset(100%);
- transition: all 0.3s;
- z-index: 1010;
- left: 50%; }
- .tooltip:not(.bottom):before, .tooltip:not(.bottom):after {
- bottom: 75%; }
- .tooltip.bottom:before, .tooltip.bottom:after {
- top: 75%; }
- .tooltip:hover:before, .tooltip:hover:after, .tooltip:focus:before, .tooltip:focus:after {
- opacity: 1;
- clip: auto;
- -webkit-clip-path: inset(0%);
- clip-path: inset(0%); }
- .tooltip:before {
- content: '';
- background: transparent;
- border: var(--universal-margin) solid transparent;
- left: calc(50% - var(--universal-margin)); }
- .tooltip:not(.bottom):before {
- border-top-color: #212121; }
- .tooltip.bottom:before {
- border-bottom-color: #212121; }
- .tooltip:after {
- content: attr(aria-label);
- color: var(--tooltip-fore-color);
- background: var(--tooltip-back-color);
- border-radius: var(--universal-border-radius);
- padding: var(--universal-padding);
- white-space: nowrap;
- transform: translateX(-50%); }
- .tooltip:not(.bottom):after {
- margin-bottom: calc(2 * var(--universal-margin)); }
- .tooltip.bottom:after {
- margin-top: calc(2 * var(--universal-margin)); }
-
-:root {
- --modal-overlay-color: rgba(0, 0, 0, 0.45);
- --modal-close-color: #e6007e;
- --modal-close-hover-color: #ffe97f; }
-
-[type="checkbox"].modal {
- height: 1px;
- width: 1px;
- margin: -1px;
- overflow: hidden;
- position: absolute;
- clip: rect(0 0 0 0);
- -webkit-clip-path: inset(100%);
- clip-path: inset(100%); }
- [type="checkbox"].modal + div {
- position: fixed;
- top: 0;
- left: 0;
- display: none;
- width: 100vw;
- height: 100vh;
- background: var(--modal-overlay-color); }
- [type="checkbox"].modal + div .card {
- margin: 0 auto;
- max-height: 50vh;
- overflow: auto; }
- [type="checkbox"].modal + div .card .modal-close {
- position: absolute;
- top: 0;
- right: 0;
- width: 1.75rem;
- height: 1.75rem;
- border-radius: var(--universal-border-radius);
- padding: var(--universal-padding);
- margin: 0;
- cursor: pointer;
- transition: background 0.3s; }
- [type="checkbox"].modal + div .card .modal-close:before {
- display: block;
- content: '\00D7';
- color: var(--modal-close-color);
- position: relative;
- font-family: sans-serif;
- font-size: 1.75rem;
- line-height: 1;
- text-align: center; }
- [type="checkbox"].modal + div .card .modal-close:hover, [type="checkbox"].modal + div .card .modal-close:focus {
- background: var(--modal-close-hover-color); }
- [type="checkbox"].modal:checked + div {
- display: flex;
- flex: 0 1 auto;
- z-index: 1200; }
- [type="checkbox"].modal:checked + div .card .modal-close {
- z-index: 1211; }
-
-:root {
- --collapse-label-back-color: #03234b;
- --collapse-label-fore-color: #ffffff;
- --collapse-label-hover-back-color: #3cb4e6;
- --collapse-selected-label-back-color: #3cb4e6;
- --collapse-border-color: var(--collapse-label-back-color);
- --collapse-selected-border-color: #ceecf8;
- --collapse-content-back-color: #ffffff;
- --collapse-selected-label-border-color: #3cb4e6; }
-
-.collapse {
- width: calc(100% - 2 * var(--universal-margin));
- opacity: 1;
- display: flex;
- flex-direction: column;
- margin: var(--universal-margin);
- border-radius: var(--universal-border-radius); }
- .collapse > [type="radio"], .collapse > [type="checkbox"] {
- height: 1px;
- width: 1px;
- margin: -1px;
- overflow: hidden;
- position: absolute;
- clip: rect(0 0 0 0);
- -webkit-clip-path: inset(100%);
- clip-path: inset(100%); }
- .collapse > label {
- flex-grow: 1;
- display: inline-block;
- height: 1.25rem;
- cursor: pointer;
- transition: background 0.2s;
- color: var(--collapse-label-fore-color);
- background: var(--collapse-label-back-color);
- border: 0.0714285714rem solid var(--collapse-selected-border-color);
- padding: calc(1.25 * var(--universal-padding)); }
- .collapse > label:hover, .collapse > label:focus {
- background: var(--collapse-label-hover-back-color); }
- .collapse > label + div {
- flex-basis: auto;
- height: 1px;
- width: 1px;
- margin: -1px;
- overflow: hidden;
- position: absolute;
- clip: rect(0 0 0 0);
- -webkit-clip-path: inset(100%);
- clip-path: inset(100%);
- transition: max-height 0.3s;
- max-height: 1px; }
- .collapse > :checked + label {
- background: var(--collapse-selected-label-back-color);
- border-color: var(--collapse-selected-label-border-color); }
- .collapse > :checked + label + div {
- box-sizing: border-box;
- position: relative;
- width: 100%;
- height: auto;
- overflow: auto;
- margin: 0;
- background: var(--collapse-content-back-color);
- border: 0.0714285714rem solid var(--collapse-selected-border-color);
- border-top: 0;
- padding: var(--universal-padding);
- clip: auto;
- -webkit-clip-path: inset(0%);
- clip-path: inset(0%);
- max-height: 100%; }
- .collapse > label:not(:first-of-type) {
- border-top: 0; }
- .collapse > label:first-of-type {
- border-radius: var(--universal-border-radius) var(--universal-border-radius) 0 0; }
- .collapse > label:last-of-type:not(:first-of-type) {
- border-radius: 0 0 var(--universal-border-radius) var(--universal-border-radius); }
- .collapse > label:last-of-type:first-of-type {
- border-radius: var(--universal-border-radius); }
- .collapse > :checked:last-of-type:not(:first-of-type) + label {
- border-radius: 0; }
- .collapse > :checked:last-of-type + label + div {
- border-radius: 0 0 var(--universal-border-radius) var(--universal-border-radius); }
-
-/*
- Custom elements for contextual background elements, toasts and tooltips.
-*/
-mark.tertiary {
- --mark-back-color: #3cb4e6; }
-
-mark.tag {
- padding: calc(var(--universal-padding)/2) var(--universal-padding);
- border-radius: 1em; }
-
-/*
- Definitions for progress elements and spinners.
-*/
-/* Progress module CSS variable definitions */
-:root {
- --progress-back-color: #3cb4e6;
- --progress-fore-color: #555; }
-
-progress {
- display: block;
- vertical-align: baseline;
- -webkit-appearance: none;
- -moz-appearance: none;
- appearance: none;
- height: 0.75rem;
- width: calc(100% - 2 * var(--universal-margin));
- margin: var(--universal-margin);
- border: 0;
- border-radius: calc(2 * var(--universal-border-radius));
- background: var(--progress-back-color);
- color: var(--progress-fore-color); }
- progress::-webkit-progress-value {
- background: var(--progress-fore-color);
- border-top-left-radius: calc(2 * var(--universal-border-radius));
- border-bottom-left-radius: calc(2 * var(--universal-border-radius)); }
- progress::-webkit-progress-bar {
- background: var(--progress-back-color); }
- progress::-moz-progress-bar {
- background: var(--progress-fore-color);
- border-top-left-radius: calc(2 * var(--universal-border-radius));
- border-bottom-left-radius: calc(2 * var(--universal-border-radius)); }
- progress[value="1000"]::-webkit-progress-value {
- border-radius: calc(2 * var(--universal-border-radius)); }
- progress[value="1000"]::-moz-progress-bar {
- border-radius: calc(2 * var(--universal-border-radius)); }
- progress.inline {
- display: inline-block;
- vertical-align: middle;
- width: 60%; }
-
-:root {
- --spinner-back-color: #ddd;
- --spinner-fore-color: #555; }
-
-@keyframes spinner-donut-anim {
- 0% {
- transform: rotate(0deg); }
- 100% {
- transform: rotate(360deg); } }
-.spinner {
- display: inline-block;
- margin: var(--universal-margin);
- border: 0.25rem solid var(--spinner-back-color);
- border-left: 0.25rem solid var(--spinner-fore-color);
- border-radius: 50%;
- width: 1.25rem;
- height: 1.25rem;
- animation: spinner-donut-anim 1.2s linear infinite; }
-
-/*
- Custom elements for progress bars and spinners.
-*/
-progress.primary {
- --progress-fore-color: #1976d2; }
-
-progress.secondary {
- --progress-fore-color: #d32f2f; }
-
-progress.tertiary {
- --progress-fore-color: #308732; }
-
-.spinner.primary {
- --spinner-fore-color: #1976d2; }
-
-.spinner.secondary {
- --spinner-fore-color: #d32f2f; }
-
-.spinner.tertiary {
- --spinner-fore-color: #308732; }
-
-/*
- Definitions for icons - powered by Feather (https://feathericons.com/).
-*/
-span[class^='icon-'] {
- display: inline-block;
- height: 1em;
- width: 1em;
- vertical-align: -0.125em;
- background-size: contain;
- margin: 0 calc(var(--universal-margin) / 4); }
- span[class^='icon-'].secondary {
- -webkit-filter: invert(25%);
- filter: invert(25%); }
- span[class^='icon-'].inverse {
- -webkit-filter: invert(100%);
- filter: invert(100%); }
-
-span.icon-alert {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12' y2='16'%3E%3C/line%3E%3C/svg%3E"); }
-span.icon-bookmark {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'%3E%3C/path%3E%3C/svg%3E"); }
-span.icon-calendar {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E"); }
-span.icon-credit {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='4' width='22' height='16' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='1' y1='10' x2='23' y2='10'%3E%3C/line%3E%3C/svg%3E"); }
-span.icon-edit {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 14.66V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.34'%3E%3C/path%3E%3Cpolygon points='18 2 22 6 12 16 8 16 8 12 18 2'%3E%3C/polygon%3E%3C/svg%3E"); }
-span.icon-link {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E"); }
-span.icon-help {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3'%3E%3C/path%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='17' x2='12' y2='17'%3E%3C/line%3E%3C/svg%3E"); }
-span.icon-home {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'%3E%3C/path%3E%3Cpolyline points='9 22 9 12 15 12 15 22'%3E%3C/polyline%3E%3C/svg%3E"); }
-span.icon-info {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='16' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='8' x2='12' y2='8'%3E%3C/line%3E%3C/svg%3E"); }
-span.icon-lock {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E"); }
-span.icon-mail {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'%3E%3C/path%3E%3Cpolyline points='22,6 12,13 2,6'%3E%3C/polyline%3E%3C/svg%3E"); }
-span.icon-location {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'%3E%3C/path%3E%3Ccircle cx='12' cy='10' r='3'%3E%3C/circle%3E%3C/svg%3E"); }
-span.icon-phone {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'%3E%3C/path%3E%3C/svg%3E"); }
-span.icon-rss {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11a9 9 0 0 1 9 9'%3E%3C/path%3E%3Cpath d='M4 4a16 16 0 0 1 16 16'%3E%3C/path%3E%3Ccircle cx='5' cy='19' r='1'%3E%3C/circle%3E%3C/svg%3E"); }
-span.icon-search {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E"); }
-span.icon-settings {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z'%3E%3C/path%3E%3C/svg%3E"); }
-span.icon-share {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'%3E%3C/circle%3E%3Ccircle cx='6' cy='12' r='3'%3E%3C/circle%3E%3Ccircle cx='18' cy='19' r='3'%3E%3C/circle%3E%3Cline x1='8.59' y1='13.51' x2='15.42' y2='17.49'%3E%3C/line%3E%3Cline x1='15.41' y1='6.51' x2='8.59' y2='10.49'%3E%3C/line%3E%3C/svg%3E"); }
-span.icon-cart {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'%3E%3C/circle%3E%3Ccircle cx='20' cy='21' r='1'%3E%3C/circle%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'%3E%3C/path%3E%3C/svg%3E"); }
-span.icon-upload {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'%3E%3C/path%3E%3Cpolyline points='17 8 12 3 7 8'%3E%3C/polyline%3E%3Cline x1='12' y1='3' x2='12' y2='15'%3E%3C/line%3E%3C/svg%3E"); }
-span.icon-user {
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2303234b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E"); }
-
-/*
- Definitions for utilities and helper classes.
-*/
-/* Utility module CSS variable definitions */
-:root {
- --generic-border-color: rgba(0, 0, 0, 0.3);
- --generic-box-shadow: 0 0.2857142857rem 0.2857142857rem 0 rgba(0, 0, 0, 0.125), 0 0.1428571429rem 0.1428571429rem -0.1428571429rem rgba(0, 0, 0, 0.125); }
-
-.hidden {
- display: none !important; }
-
-.visually-hidden {
- position: absolute !important;
- width: 1px !important;
- height: 1px !important;
- margin: -1px !important;
- border: 0 !important;
- padding: 0 !important;
- clip: rect(0 0 0 0) !important;
- -webkit-clip-path: inset(100%) !important;
- clip-path: inset(100%) !important;
- overflow: hidden !important; }
-
-.bordered {
- border: 0.0714285714rem solid var(--generic-border-color) !important; }
-
-.rounded {
- border-radius: var(--universal-border-radius) !important; }
-
-.circular {
- border-radius: 50% !important; }
-
-.shadowed {
- box-shadow: var(--generic-box-shadow) !important; }
-
-.responsive-margin {
- margin: calc(var(--universal-margin) / 4) !important; }
- @media screen and (min-width: 500px) {
- .responsive-margin {
- margin: calc(var(--universal-margin) / 2) !important; } }
- @media screen and (min-width: 1280px) {
- .responsive-margin {
- margin: var(--universal-margin) !important; } }
-
-.responsive-padding {
- padding: calc(var(--universal-padding) / 4) !important; }
- @media screen and (min-width: 500px) {
- .responsive-padding {
- padding: calc(var(--universal-padding) / 2) !important; } }
- @media screen and (min-width: 1280px) {
- .responsive-padding {
- padding: var(--universal-padding) !important; } }
-
-@media screen and (max-width: 499px) {
- .hidden-sm {
- display: none !important; } }
-@media screen and (min-width: 500px) and (max-width: 1279px) {
- .hidden-md {
- display: none !important; } }
-@media screen and (min-width: 1280px) {
- .hidden-lg {
- display: none !important; } }
-@media screen and (max-width: 499px) {
- .visually-hidden-sm {
- position: absolute !important;
- width: 1px !important;
- height: 1px !important;
- margin: -1px !important;
- border: 0 !important;
- padding: 0 !important;
- clip: rect(0 0 0 0) !important;
- -webkit-clip-path: inset(100%) !important;
- clip-path: inset(100%) !important;
- overflow: hidden !important; } }
-@media screen and (min-width: 500px) and (max-width: 1279px) {
- .visually-hidden-md {
- position: absolute !important;
- width: 1px !important;
- height: 1px !important;
- margin: -1px !important;
- border: 0 !important;
- padding: 0 !important;
- clip: rect(0 0 0 0) !important;
- -webkit-clip-path: inset(100%) !important;
- clip-path: inset(100%) !important;
- overflow: hidden !important; } }
-@media screen and (min-width: 1280px) {
- .visually-hidden-lg {
- position: absolute !important;
- width: 1px !important;
- height: 1px !important;
- margin: -1px !important;
- border: 0 !important;
- padding: 0 !important;
- clip: rect(0 0 0 0) !important;
- -webkit-clip-path: inset(100%) !important;
- clip-path: inset(100%) !important;
- overflow: hidden !important; } }
-
-/*# sourceMappingURL=mini-custom.css.map */
-
-img[alt="ST logo"] { display: block; margin: auto; width: 75%; max-width: 250px; min-width: 71px; }
-img[alt="Cube logo"] { float: right; width: 30%; max-width: 10rem; min-width: 8rem; padding-right: 1rem;}
-
-.figure {
- display: block;
- margin-left: auto;
- margin-right: auto;
- text-align: center;
-}
\ No newline at end of file
diff --git a/Drivers/BSP/STM322xG_EVAL/_htmresc/st_logo_2020.png b/Drivers/BSP/STM322xG_EVAL/_htmresc/st_logo_2020.png
deleted file mode 100644
index d6cebb5a..00000000
Binary files a/Drivers/BSP/STM322xG_EVAL/_htmresc/st_logo_2020.png and /dev/null differ
diff --git a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval.c b/Drivers/BSP/STM322xG_EVAL/stm322xg_eval.c
deleted file mode 100644
index 148d6e82..00000000
--- a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval.c
+++ /dev/null
@@ -1,1145 +0,0 @@
-/**
- ******************************************************************************
- * @file stm322xg_eval.c
- * @author MCD Application Team
- * @brief This file provides a set of firmware functions to manage LEDs,
- * push-buttons and COM ports available on STM322xG-EVAL evaluation
- * board(MB786) RevB from STMicroelectronics.
- ******************************************************************************
- * @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.
- *
- ******************************************************************************
- */
-
-/* File Info: ------------------------------------------------------------------
- User NOTE
-
- This driver requires the stm322xg_eval_io.c driver to manage the joystick
-
-------------------------------------------------------------------------------*/
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm322xg_eval.h"
-#include "stm322xg_eval_io.h"
-
-/** @defgroup BSP BSP
- * @{
- */
-
-/** @defgroup STM322xG_EVAL STM322xG_EVAL
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_LOW_LEVEL STM322xG EVAL LOW LEVEL
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_LOW_LEVEL_Private_TypesDefinitions STM322xG EVAL LOW LEVEL Private TypesDefinitions
- * @{
- */
-typedef struct
-{
- __IO uint16_t REG;
- __IO uint16_t RAM;
-}LCD_CONTROLLER_TypeDef;
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_LOW_LEVEL_Private_Defines STM322xG EVAL LOW LEVEL Private Defines
- * @{
- */
-
-/**
- * @brief STM322xG EVAL BSP Driver version number V7.0.1
- */
-#define __STM322xG_EVAL_BSP_VERSION_MAIN (0x07) /*!< [31:24] main version */
-#define __STM322xG_EVAL_BSP_VERSION_SUB1 (0x00) /*!< [23:16] sub1 version */
-#define __STM322xG_EVAL_BSP_VERSION_SUB2 (0x02) /*!< [15:8] sub2 version */
-#define __STM322xG_EVAL_BSP_VERSION_RC (0x00) /*!< [7:0] release candidate */
-#define __STM322xG_EVAL_BSP_VERSION ((__STM322xG_EVAL_BSP_VERSION_MAIN << 24)\
- |(__STM322xG_EVAL_BSP_VERSION_SUB1 << 16)\
- |(__STM322xG_EVAL_BSP_VERSION_SUB2 << 8 )\
- |(__STM322xG_EVAL_BSP_VERSION_RC))
-
-#define FSMC_BANK3_BASE ((uint32_t)(0x60000000 | 0x08000000))
-#define FSMC_BANK3 ((LCD_CONTROLLER_TypeDef *) FSMC_BANK3_BASE)
-
-#define I2C_TIMEOUT 100 /*Instance = COM_USART[COM];
- HAL_UART_Init(huart);
-}
-
-/**
- * @brief Init Potentiometer.
- */
-void BSP_POTENTIOMETER_Init(void)
-{
- GPIO_InitTypeDef GPIO_InitStruct;
- ADC_ChannelConfTypeDef ADC_Config;
-
- /* ADC an GPIO Periph clock enable */
- ADCx_CLK_ENABLE();
- ADCx_CHANNEL_GPIO_CLK_ENABLE();
-
- /* ADC Channel GPIO pin configuration */
- GPIO_InitStruct.Pin = ADCx_CHANNEL_PIN;
- GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- HAL_GPIO_Init(ADCx_CHANNEL_GPIO_PORT, &GPIO_InitStruct);
-
- /* Configure the ADC peripheral */
- hEvalADC.Instance = ADCx;
-
- HAL_ADC_DeInit(&hEvalADC);
-
- hEvalADC.Init.ClockPrescaler = ADC_CLOCKPRESCALER_PCLK_DIV2; /* Asynchronous clock mode, input ADC clock not divided */
- hEvalADC.Init.Resolution = ADC_RESOLUTION_12B; /* 12-bit resolution for converted data */
- hEvalADC.Init.DataAlign = ADC_DATAALIGN_RIGHT; /* Right-alignment for converted data */
- hEvalADC.Init.ScanConvMode = DISABLE; /* Sequencer disabled (ADC conversion on only 1 channel: channel set on rank 1) */
- hEvalADC.Init.EOCSelection = DISABLE; /* EOC flag picked-up to indicate conversion end */
- hEvalADC.Init.ContinuousConvMode = DISABLE; /* Continuous mode disabled to have only 1 conversion at each conversion trig */
- hEvalADC.Init.NbrOfConversion = 1; /* Parameter discarded because sequencer is disabled */
- hEvalADC.Init.DiscontinuousConvMode = DISABLE; /* Parameter discarded because sequencer is disabled */
- hEvalADC.Init.NbrOfDiscConversion = 0; /* Parameter discarded because sequencer is disabled */
- hEvalADC.Init.ExternalTrigConv = ADC_EXTERNALTRIGCONV_T1_CC1; /* Software start to trig the 1st conversion manually, without external event */
- hEvalADC.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE; /* Parameter discarded because software trigger chosen */
- hEvalADC.Init.DMAContinuousRequests = DISABLE; /* DMA one-shot mode selected */
-
- HAL_ADC_Init(&hEvalADC);
-
- /* Configure ADC regular channel */
- ADC_Config.Channel = ADCx_CHANNEL; /* Sampled channel number */
- ADC_Config.Rank = 1; /* Rank of sampled channel number ADCx_CHANNEL */
- ADC_Config.SamplingTime = ADC_SAMPLETIME_3CYCLES; /* Sampling time (number of clock cycles unit) */
- ADC_Config.Offset = 0; /* Parameter discarded because offset correction is disabled */
-
- HAL_ADC_ConfigChannel(&hEvalADC, &ADC_Config);
-}
-
-/**
- * @brief Get Potentiometer level in 12 bits.
- * @retval Potentiometer level(0..0xFFF) / 0xFFFFFFFF : Error
- */
-uint32_t BSP_POTENTIOMETER_GetLevel(void)
-{
- if(HAL_ADC_Start(&hEvalADC) == HAL_OK)
- {
- /* Wait for the end of conversion */
- if(HAL_ADC_PollForConversion(&hEvalADC, ADCx_POLL_TIMEOUT)== HAL_OK)
- {
- /* Check if the continuous conversion of regular channel is finished */
- if((HAL_ADC_GetState(&hEvalADC) & HAL_ADC_STATE_EOC_REG) == HAL_ADC_STATE_EOC_REG)
- {
- /* return the converted value of regular channel */
- return (HAL_ADC_GetValue(&hEvalADC));
- }
- }
- }
- return 0xFFFFFFFF;
-}
-
-/**
- * @brief Configures joystick GPIO and EXTI modes.
- * @param Joy_Mode: Button mode.
- * This parameter can be one of the following values:
- * @arg JOY_MODE_GPIO: Joystick pins will be used as simple IOs
- * @arg JOY_MODE_EXTI: Joystick pins will be connected to EXTI line
- * with interrupt generation capability
- * @retval IO_OK: if all initializations are OK. Other value if error.
- */
-uint8_t BSP_JOY_Init(JOYMode_TypeDef Joy_Mode)
-{
- uint8_t ret = 0;
-
- /* Initialize the IO functionalities */
- ret = BSP_IO_Init();
-
- /* Configure joystick pins in IT mode */
- if(Joy_Mode == JOY_MODE_EXTI)
- {
- /* Configure joystick pins in IT mode */
- BSP_IO_ConfigPin(JOY_ALL_PINS, IO_MODE_IT_FALLING_EDGE);
- }
-
- return ret;
-}
-
-/**
- * @brief Returns the current joystick status.
- * @retval Code of the joystick key pressed
- * This code can be one of the following values:
- * @arg JOY_NONE
- * @arg JOY_SEL
- * @arg JOY_DOWN
- * @arg JOY_LEFT
- * @arg JOY_RIGHT
- * @arg JOY_UP
- */
-JOYState_TypeDef BSP_JOY_GetState(void)
-{
- uint8_t tmp = 0;
-
- /* Read the status joystick pins */
- tmp = (uint8_t)BSP_IO_ReadPin(JOY_ALL_PINS);
-
- /* Check the pressed keys */
- if((tmp & JOY_NONE_PIN) == JOY_NONE)
- {
- return(JOYState_TypeDef) JOY_NONE;
- }
- else if(!(tmp & JOY_SEL_PIN))
- {
- return(JOYState_TypeDef) JOY_SEL;
- }
- else if(!(tmp & JOY_DOWN_PIN))
- {
- return(JOYState_TypeDef) JOY_DOWN;
- }
- else if(!(tmp & JOY_LEFT_PIN))
- {
- return(JOYState_TypeDef) JOY_LEFT;
- }
- else if(!(tmp & JOY_RIGHT_PIN))
- {
- return(JOYState_TypeDef) JOY_RIGHT;
- }
- else if(!(tmp & JOY_UP_PIN))
- {
- return(JOYState_TypeDef) JOY_UP;
- }
- else
- {
- return(JOYState_TypeDef) JOY_NONE;
- }
-}
-
-/*******************************************************************************
- BUS OPERATIONS
-*******************************************************************************/
-
-/**************************** I2C Routines ************************************/
-
-/**
- * @brief Initializes I2C MSP.
- */
-static void I2Cx_MspInit(void)
-{
- GPIO_InitTypeDef GPIO_InitStruct;
-
- /*** Configure the GPIOs ***/
- /* Enable GPIO clock */
- EVAL_I2Cx_SCL_SDA_GPIO_CLK_ENABLE();
-
- /* Workaround: Configure I2C SCL/SDA pins as Output Push Pull Mode inorder
- to force the high state before connecting the I2C alternate function */
- GPIO_InitStruct.Pin = EVAL_I2Cx_SCL_PIN;
- GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
- GPIO_InitStruct.Pull = GPIO_PULLUP;
- GPIO_InitStruct.Speed = GPIO_SPEED_FAST;
- HAL_GPIO_Init(EVAL_I2Cx_SCL_SDA_GPIO_PORT, &GPIO_InitStruct);
-
- GPIO_InitStruct.Pin = EVAL_I2Cx_SDA_PIN;
- HAL_GPIO_Init(EVAL_I2Cx_SCL_SDA_GPIO_PORT, &GPIO_InitStruct);
-
- HAL_GPIO_WritePin(EVAL_I2Cx_SCL_SDA_GPIO_PORT, EVAL_I2Cx_SCL_PIN, GPIO_PIN_SET);
- HAL_GPIO_WritePin(EVAL_I2Cx_SCL_SDA_GPIO_PORT, EVAL_I2Cx_SDA_PIN, GPIO_PIN_SET);
-
- /* Configure I2C SCL as alternate function */
- GPIO_InitStruct.Pin = EVAL_I2Cx_SCL_PIN;
- GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
- GPIO_InitStruct.Alternate = EVAL_I2Cx_SCL_SDA_AF;
- HAL_GPIO_Init(EVAL_I2Cx_SCL_SDA_GPIO_PORT, &GPIO_InitStruct);
-
- /* Configure I2C SDA as alternate function */
- GPIO_InitStruct.Pin = EVAL_I2Cx_SDA_PIN;
- HAL_GPIO_Init(EVAL_I2Cx_SCL_SDA_GPIO_PORT, &GPIO_InitStruct);
-
- /*** Configure the I2C peripheral ***/
- /* Enable I2C clock */
- EVAL_I2Cx_CLK_ENABLE();
-
- /* Force the I2C peripheral clock reset */
- EVAL_I2Cx_FORCE_RESET();
-
- /* Release the I2C peripheral clock reset */
- EVAL_I2Cx_RELEASE_RESET();
-
- /* Set priority and enable I2Cx event Interrupt */
- HAL_NVIC_SetPriority(EVAL_I2Cx_EV_IRQn, 0x0F, 0);
- HAL_NVIC_EnableIRQ(EVAL_I2Cx_EV_IRQn);
-
- /* Set priority and enable I2Cx error Interrupt */
- HAL_NVIC_SetPriority(EVAL_I2Cx_ER_IRQn, 0x0F, 0);
- HAL_NVIC_EnableIRQ(EVAL_I2Cx_ER_IRQn);
-}
-
-/**
- * @brief Initializes I2C HAL.
- */
-static void I2Cx_Init(void)
-{
- if(HAL_I2C_GetState(&heval_I2c) == HAL_I2C_STATE_RESET)
- {
- heval_I2c.Instance = EVAL_I2Cx;
- heval_I2c.Init.ClockSpeed = BSP_I2C_SPEED;
- heval_I2c.Init.DutyCycle = I2C_DUTYCYCLE_2;
- heval_I2c.Init.OwnAddress1 = 0;
- heval_I2c.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
- heval_I2c.Init.DualAddressMode = I2C_DUALADDRESS_DISABLED;
- heval_I2c.Init.OwnAddress2 = 0;
- heval_I2c.Init.GeneralCallMode = I2C_GENERALCALL_DISABLED;
- heval_I2c.Init.NoStretchMode = I2C_NOSTRETCH_DISABLED;
-
- /* Init the I2C */
- I2Cx_MspInit();
- HAL_I2C_Init(&heval_I2c);
- }
-}
-
-/**
- * @brief Configures I2C Interrupt.
- */
-static void I2Cx_ITConfig(void)
-{
- static uint8_t I2C_IT_Enabled = 0;
- GPIO_InitTypeDef GPIO_InitStruct;
-
- if(I2C_IT_Enabled == 0)
- {
- I2C_IT_Enabled = 1;
-
- /* Enable the GPIO EXTI clock */
- __HAL_RCC_GPIOI_CLK_ENABLE();
- __HAL_RCC_SYSCFG_CLK_ENABLE();
-
- GPIO_InitStruct.Pin = GPIO_PIN_2;
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- GPIO_InitStruct.Speed = GPIO_SPEED_FAST;
- GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
- HAL_GPIO_Init(GPIOI, &GPIO_InitStruct);
-
- /* Set priority and Enable GPIO EXTI Interrupt */
- HAL_NVIC_SetPriority((IRQn_Type)(EXTI2_IRQn), 0x0F, 0);
- HAL_NVIC_EnableIRQ((IRQn_Type)(EXTI2_IRQn));
- }
-}
-
-/**
- * @brief Reads a single data.
- * @param Addr: I2C address
- * @param Reg: Reg address
- * @retval Data to be read
- */
-static uint8_t I2Cx_Read(uint8_t Addr, uint8_t Reg)
-{
- HAL_StatusTypeDef status = HAL_OK;
- uint8_t Value = 0;
-
- status = HAL_I2C_Mem_Read(&heval_I2c, Addr, Reg, I2C_MEMADD_SIZE_8BIT, &Value, 1, I2C_TIMEOUT);
-
- /* Check the communication status */
- if(status != HAL_OK)
- {
- /* Execute user timeout callback */
- I2Cx_Error(Addr);
- }
-
- return Value;
-}
-
-/**
- * @brief Writes a single data.
- * @param Addr: I2C address
- * @param Reg: Reg address
- * @param Value: Data to be written
- */
-static void I2Cx_Write(uint8_t Addr, uint8_t Reg, uint8_t Value)
-{
- HAL_StatusTypeDef status = HAL_OK;
-
- status = HAL_I2C_Mem_Write(&heval_I2c, Addr, (uint16_t)Reg, I2C_MEMADD_SIZE_8BIT, &Value, 1, I2C_TIMEOUT);
-
- /* Check the communication status */
- if(status != HAL_OK)
- {
- /* I2C error occurred*/
- I2Cx_Error(Addr);
- }
-}
-
-/**
- * @brief Reads multiple data.
- * @param Addr: I2C address
- * @param Reg: Reg address
- * @param MemAddress Internal memory address
- * @param Buffer: Pointer to data buffer
- * @param Length: Length of the data
- * @retval Number of read data
- */
-static HAL_StatusTypeDef I2Cx_ReadMultiple(uint8_t Addr, uint16_t Reg, uint16_t MemAddress, uint8_t *Buffer, uint16_t Length)
-{
- HAL_StatusTypeDef status = HAL_OK;
-
- status = HAL_I2C_Mem_Read(&heval_I2c, Addr, (uint16_t)Reg, MemAddress, Buffer, Length, I2C_TIMEOUT);
-
- /* Check the communication status */
- if(status != HAL_OK)
- {
- /* I2C error occurred*/
- I2Cx_Error(Addr);
- }
- return status;
-}
-
-/**
- * @brief Write a value in a register of the device through BUS in using DMA mode
- * @param Addr: Device address on BUS Bus.
- * @param Reg: The target register address to write
- * @param MemAddress Internal memory address
- * @param Buffer: The target register value to be written
- * @param Length: buffer size to be written
- * @retval HAL status
- */
-static HAL_StatusTypeDef I2Cx_WriteMultiple(uint8_t Addr, uint16_t Reg, uint16_t MemAddress, uint8_t *Buffer, uint16_t Length)
-{
- HAL_StatusTypeDef status = HAL_OK;
-
- status = HAL_I2C_Mem_Write(&heval_I2c, Addr, (uint16_t)Reg, MemAddress, Buffer, Length, I2C_TIMEOUT);
-
- /* Check the communication status */
- if(status != HAL_OK)
- {
- /* Re-Initiaize the I2C Bus */
- I2Cx_Error(Addr);
- }
- return status;
-}
-
-/**
- * @brief Checks if target device is ready for communication.
- * @note This function is used with Memory devices
- * @param DevAddress: Target device address
- * @param Trials: Number of trials
- * @retval HAL status
- */
-static HAL_StatusTypeDef I2Cx_IsDeviceReady(uint16_t DevAddress, uint32_t Trials)
-{
- return (HAL_I2C_IsDeviceReady(&heval_I2c, DevAddress, Trials, I2C_TIMEOUT));
-}
-
-/**
- * @brief Manages error callback by re-initializing I2C.
- * @param Addr: I2C Address
- */
-static void I2Cx_Error(uint8_t Addr)
-{
- /* De-initialize the IOE communication BUS */
- HAL_I2C_DeInit(&heval_I2c);
-
- /* Re-Initiaize the IOE communication BUS */
- I2Cx_Init();
-}
-
-/*************************** FSMC Routines ************************************/
-/**
- * @brief Initializes FSMC_BANK3 MSP.
- */
-static void FSMC_BANK3_MspInit(void)
-{
- GPIO_InitTypeDef GPIO_Init_Structure;
-
- /* Enable FSMC clock */
- __HAL_RCC_FSMC_CLK_ENABLE();
-
- /* Enable GPIOs clock */
- __HAL_RCC_GPIOD_CLK_ENABLE();
- __HAL_RCC_GPIOE_CLK_ENABLE();
- __HAL_RCC_GPIOF_CLK_ENABLE();
- __HAL_RCC_GPIOG_CLK_ENABLE();
-
- /* Common GPIO configuration */
- GPIO_Init_Structure.Mode = GPIO_MODE_AF_PP;
- GPIO_Init_Structure.Pull = GPIO_PULLUP;
- GPIO_Init_Structure.Speed = GPIO_SPEED_HIGH;
- GPIO_Init_Structure.Alternate = GPIO_AF12_FSMC;
-
- /* GPIOD configuration */
- GPIO_Init_Structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_8 |\
- GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 |\
- GPIO_PIN_14 | GPIO_PIN_15;
-
- HAL_GPIO_Init(GPIOD, &GPIO_Init_Structure);
-
- /* GPIOE configuration */
- GPIO_Init_Structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_3| GPIO_PIN_4 | GPIO_PIN_7 |\
- GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12 |\
- GPIO_PIN_13 | GPIO_PIN_14 | GPIO_PIN_15;
- HAL_GPIO_Init(GPIOE, &GPIO_Init_Structure);
-
- /* GPIOF configuration */
- GPIO_Init_Structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2| GPIO_PIN_3 | GPIO_PIN_4 |\
- GPIO_PIN_5 | GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 | GPIO_PIN_15;
- HAL_GPIO_Init(GPIOF, &GPIO_Init_Structure);
-
- /* GPIOG configuration */
- GPIO_Init_Structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2| GPIO_PIN_3 | GPIO_PIN_4 |\
- GPIO_PIN_5 | GPIO_PIN_10;
-
- HAL_GPIO_Init(GPIOG, &GPIO_Init_Structure);
-}
-
-/**
- * @brief Initializes LCD IO.
- */
-static void FSMC_BANK3_Init(void)
-{
- SRAM_HandleTypeDef hsram;
- FSMC_NORSRAM_TimingTypeDef SRAM_Timing;
-
- /*** Configure the SRAM Bank 3 ***/
- /* Configure IPs */
- hsram.Instance = FSMC_NORSRAM_DEVICE;
- hsram.Extended = FSMC_NORSRAM_EXTENDED_DEVICE;
-
- SRAM_Timing.AddressSetupTime = 5;
- SRAM_Timing.AddressHoldTime = 1;
- SRAM_Timing.DataSetupTime = 9;
- SRAM_Timing.BusTurnAroundDuration = 0;
- SRAM_Timing.CLKDivision = 2;
- SRAM_Timing.DataLatency = 2;
- SRAM_Timing.AccessMode = FSMC_ACCESS_MODE_A;
-
- hsram.Init.NSBank = FSMC_NORSRAM_BANK3;
- hsram.Init.DataAddressMux = FSMC_DATA_ADDRESS_MUX_DISABLE;
- hsram.Init.MemoryType = FSMC_MEMORY_TYPE_SRAM;
- hsram.Init.MemoryDataWidth = FSMC_NORSRAM_MEM_BUS_WIDTH_16;
- hsram.Init.BurstAccessMode = FSMC_BURST_ACCESS_MODE_DISABLE;
- hsram.Init.WaitSignalPolarity = FSMC_WAIT_SIGNAL_POLARITY_LOW;
- hsram.Init.WrapMode = FSMC_WRAP_MODE_DISABLE;
- hsram.Init.WaitSignalActive = FSMC_WAIT_TIMING_BEFORE_WS;
- hsram.Init.WriteOperation = FSMC_WRITE_OPERATION_ENABLE;
- hsram.Init.WaitSignal = FSMC_WAIT_SIGNAL_DISABLE;
- hsram.Init.ExtendedMode = FSMC_EXTENDED_MODE_DISABLE;
- hsram.Init.AsynchronousWait = FSMC_ASYNCHRONOUS_WAIT_DISABLE;
- hsram.Init.WriteBurst = FSMC_WRITE_BURST_DISABLE;
-
- /* Initialize the SRAM controller */
- FSMC_BANK3_MspInit();
- HAL_SRAM_Init(&hsram, &SRAM_Timing, &SRAM_Timing);
-}
-
-/**
- * @brief Writes register value.
- * @param Data: Data to be written
- */
-static void FSMC_BANK3_WriteData(uint16_t Data)
-{
- /* Write 16-bit Reg */
- FSMC_BANK3->RAM = Data;
-}
-
-/**
- * @brief Writes register address.
- * @param Reg: Register to be written
- */
-static void FSMC_BANK3_WriteReg(uint8_t Reg)
-{
- /* Write 16-bit Index, then write register */
- FSMC_BANK3->REG = Reg;
-}
-
-/**
- * @brief Reads register value.
- * @retval Read value
- */
-static uint16_t FSMC_BANK3_ReadData(void)
-{
- return FSMC_BANK3->RAM;
-}
-
-/*******************************************************************************
- LINK OPERATIONS
-*******************************************************************************/
-
-/***************************** LINK IOE ***************************************/
-
-/**
- * @brief Initializes IOE low level.
- */
-void IOE_Init(void)
-{
- I2Cx_Init();
-}
-
-/**
- * @brief Configures IOE low level Interrupt.
- */
-void IOE_ITConfig(void)
-{
- I2Cx_ITConfig();
-}
-
-/**
- * @brief IOE writes single data.
- * @param Addr: I2C address
- * @param Reg: Reg address
- * @param Value: Data to be written
- */
-void IOE_Write(uint8_t Addr, uint8_t Reg, uint8_t Value)
-{
- I2Cx_Write(Addr, Reg, Value);
-}
-
-/**
- * @brief IOE reads single data.
- * @param Addr: I2C address
- * @param Reg: Reg address
- * @retval Read data
- */
-uint8_t IOE_Read(uint8_t Addr, uint8_t Reg)
-{
- return I2Cx_Read(Addr, Reg);
-}
-
-/**
- * @brief IOE reads multiple data.
- * @param Addr: I2C address
- * @param Reg: Reg address
- * @param Buffer: Pointer to data buffer
- * @param Length: Length of the data
- * @retval Number of read data
- */
-uint16_t IOE_ReadMultiple(uint8_t Addr, uint8_t Reg, uint8_t *Buffer, uint16_t Length)
-{
- return I2Cx_ReadMultiple(Addr, Reg, I2C_MEMADD_SIZE_8BIT, Buffer, Length);
-}
-
-/**
- * @brief IOE delay.
- * @param Delay: Delay in ms
- */
-void IOE_Delay(uint32_t Delay)
-{
- HAL_Delay(Delay);
-}
-
-/********************************* LINK LCD ***********************************/
-
-/**
- * @brief Initializes LCD low level.
- */
-void LCD_IO_Init(void)
-{
- if(Is_LCD_IO_Initialized == 0)
- {
- Is_LCD_IO_Initialized = 1;
- FSMC_BANK3_Init();
- }
-}
-
-/**
- * @brief Writes data on LCD data register.
- * @param Data: Data to be written
- */
-void LCD_IO_WriteData(uint16_t Data)
-{
- /* Write 16-bit Reg */
- FSMC_BANK3_WriteData(Data);
-}
-
-/**
- * @brief Write register value.
- * @param pData Pointer on the register value
- * @param Size Size of byte to transmit to the register
- */
-void LCD_IO_WriteMultipleData(uint8_t *pData, uint32_t Size)
-{
- uint32_t counter;
- uint16_t *ptr = (uint16_t *) pData;
-
- for (counter = 0; counter < Size; counter+=2)
- {
- /* Write 16-bit Reg */
- FSMC_BANK3_WriteData(*ptr);
- ptr++;
- }
-}
-
-/**
- * @brief Writes register on LCD register.
- * @param Reg: Register to be written
- */
-void LCD_IO_WriteReg(uint8_t Reg)
-{
- /* Write 16-bit Index, then Write Reg */
- FSMC_BANK3_WriteReg(Reg);
-}
-
-/**
- * @brief Reads data from LCD data register.
- * @param Reg: Register to be read
- * @retval Read data.
- */
-uint16_t LCD_IO_ReadData(uint16_t Reg)
-{
- FSMC_BANK3_WriteReg(Reg);
-
- /* Read 16-bit Reg */
- return FSMC_BANK3_ReadData();
-}
-
-/********************************* LINK AUDIO *********************************/
-/**
- * @brief Initializes Audio low level.
- */
-void AUDIO_IO_Init(void)
-{
- I2Cx_Init();
-}
-
-/**
- * @brief DeInitializes Audio low level.
- * @note This function is intentionally kept empty, user should define it.
- */
-void AUDIO_IO_DeInit(void)
-{
-
-}
-
-/**
- * @brief Writes a single data.
- * @param Addr: I2C address
- * @param Reg: Reg address
- * @param Value: Data to be written
- */
-void AUDIO_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value)
-{
- I2Cx_Write(Addr, Reg, Value);
-}
-
-/**
- * @brief Reads a single data.
- * @param Addr: I2C address
- * @param Reg: Reg address
- * @retval Data to be read
- */
-uint8_t AUDIO_IO_Read(uint8_t Addr, uint8_t Reg)
-{
- return I2Cx_Read(Addr, Reg);
-}
-
-/***************************** LINK CAMERA ************************************/
-
-/**
- * @brief Initializes Camera low level.
- */
-void CAMERA_IO_Init(void)
-{
- I2Cx_Init();
-}
-
-/**
- * @brief Camera writes single data.
- * @param Addr: I2C address
- * @param Reg: Reg address
- * @param Value: Data to be written
- */
-void CAMERA_IO_Write(uint8_t Addr, uint8_t Reg, uint8_t Value)
-{
- I2Cx_Write(Addr, Reg, Value);
-}
-
-/**
- * @brief Camera reads single data.
- * @param Addr: I2C address
- * @param Reg: Reg address
- * @retval Read data
- */
-uint8_t CAMERA_IO_Read(uint8_t Addr, uint8_t Reg)
-{
- return I2Cx_Read(Addr, Reg);
-}
-
-/**
- * @brief Camera delay.
- * @param Delay: Delay in ms
- */
-void CAMERA_Delay(uint32_t Delay)
-{
- HAL_Delay(Delay);
-}
-
-/******************************** LINK I2C EEPROM *****************************/
-
-/**
- * @brief Initializes peripherals used by the I2C EEPROM driver.
- */
-void EEPROM_IO_Init(void)
-{
- I2Cx_Init();
-}
-
-/**
- * @brief Write data to I2C EEPROM driver in using DMA channel
- * @param DevAddress: Target device address
- * @param MemAddress: Internal memory address
- * @param pBuffer: Pointer to data buffer
- * @param BufferSize: Amount of data to be sent
- * @retval HAL status
- */
-HAL_StatusTypeDef EEPROM_IO_WriteData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize)
-{
- return (I2Cx_WriteMultiple(DevAddress, MemAddress, I2C_MEMADD_SIZE_16BIT, pBuffer, BufferSize));
-}
-
-/**
- * @brief Reads data from I2C EEPROM driver in using DMA channel.
- * @param DevAddress: Target device address
- * @param MemAddress: Internal memory address
- * @param pBuffer: Pointer to data buffer
- * @param BufferSize: Amount of data to be read
- * @retval HAL status
- */
-HAL_StatusTypeDef EEPROM_IO_ReadData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize)
-{
- return (I2Cx_ReadMultiple(DevAddress, MemAddress, I2C_MEMADD_SIZE_16BIT, pBuffer, BufferSize));
-}
-
-/**
- * @brief Checks if target device is ready for communication.
- * @note This function is used with Memory devices
- * @param DevAddress: Target device address
- * @param Trials: Number of trials
- * @retval HAL status
- */
-HAL_StatusTypeDef EEPROM_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials)
-{
- return (I2Cx_IsDeviceReady(DevAddress, Trials));
-}
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
diff --git a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval.h b/Drivers/BSP/STM322xG_EVAL/stm322xg_eval.h
deleted file mode 100644
index 293773d0..00000000
--- a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval.h
+++ /dev/null
@@ -1,348 +0,0 @@
-/**
- ******************************************************************************
- * @file stm322xg_eval.h
- * @author MCD Application Team
- * @brief This file contains definitions for STM322xG_EVAL's LEDs,
- * push-buttons and COM ports hardware resources.
- ******************************************************************************
- * @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 __STM322xG_EVAL_H
-#define __STM322xG_EVAL_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f2xx_hal.h"
-
-/** @addtogroup BSP
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL_LOW_LEVEL
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_LOW_LEVEL_Exported_Types STM322xG EVAL LOW LEVEL Exported Types
- * @{
- */
-typedef enum
-{
- LED1 = 0,
- LED2 = 1,
- LED3 = 2,
- LED4 = 3
-}Led_TypeDef;
-
-typedef enum
-{
- BUTTON_WAKEUP = 0,
- BUTTON_TAMPER = 1,
- BUTTON_KEY = 2,
- BUTTON_RIGHT = 3,
- BUTTON_LEFT = 4,
- BUTTON_UP = 5,
- BUTTON_DOWN = 6,
- BUTTON_SEL = 7
-}Button_TypeDef;
-
-typedef enum
-{
- BUTTON_MODE_GPIO = 0,
- BUTTON_MODE_EXTI = 1
-}ButtonMode_TypeDef;
-
-typedef enum
-{
- JOY_MODE_GPIO = 0,
- JOY_MODE_EXTI = 1
-}JOYMode_TypeDef;
-
-typedef enum
-{
- JOY_NONE = 0,
- JOY_SEL = 1,
- JOY_DOWN = 2,
- JOY_LEFT = 3,
- JOY_RIGHT = 4,
- JOY_UP = 5
-}JOYState_TypeDef;
-
-typedef enum
-{
- COM1 = 0,
- COM2 = 1
-}COM_TypeDef;
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_LOW_LEVEL_Exported_Constants STM322xG EVAL LOW LEVEL Exported Constants
- * @{
- */
-
-/**
- * @brief Define for STM322xG_EVAL board
- */
-#if !defined (USE_STM322xG_EVAL)
- #define USE_STM322xG_EVAL
-#endif
-
-/** @addtogroup STM322xG_EVAL_LOW_LEVEL_LED STM322xG EVAL LOW LEVEL LED
- * @{
- */
-#define LEDn 4
-
-#define LED1_PIN GPIO_PIN_6
-#define LED1_GPIO_PORT GPIOG
-#define LED1_GPIO_CLK_ENABLE() __HAL_RCC_GPIOG_CLK_ENABLE()
-#define LED1_GPIO_CLK_DISABLE() __HAL_RCC_GPIOG_CLK_DISABLE()
-
-#define LED2_PIN GPIO_PIN_8
-#define LED2_GPIO_PORT GPIOG
-#define LED2_GPIO_CLK_ENABLE() __HAL_RCC_GPIOG_CLK_ENABLE()
-#define LED2_GPIO_CLK_DISABLE() __HAL_RCC_GPIOG_CLK_DISABLE()
-
-#define LED3_PIN GPIO_PIN_9
-#define LED3_GPIO_PORT GPIOI
-#define LED3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOI_CLK_ENABLE()
-#define LED3_GPIO_CLK_DISABLE() __HAL_RCC_GPIOI_CLK_DISABLE()
-
-#define LED4_PIN GPIO_PIN_7
-#define LED4_GPIO_PORT GPIOC
-#define LED4_GPIO_CLK RCC_AHB1Periph_GPIOC
-#define LED4_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
-#define LED4_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
-
-#define LEDx_GPIO_CLK_ENABLE(__INDEX__) do{if((__INDEX__) == 0) LED1_GPIO_CLK_ENABLE(); else \
- if((__INDEX__) == 1) LED2_GPIO_CLK_ENABLE(); else \
- if((__INDEX__) == 2) LED3_GPIO_CLK_ENABLE(); else \
- if((__INDEX__) == 3) LED4_GPIO_CLK_ENABLE(); \
- }while(0)
-#define LEDx_GPIO_CLK_DISABLE(__INDEX__) do{if((__INDEX__) == 0) LED1_GPIO_CLK_DISABLE(); else \
- if((__INDEX__) == 1) LED2_GPIO_CLK_DISABLE(); else \
- if((__INDEX__) == 2) LED3_GPIO_CLK_DISABLE(); else \
- if((__INDEX__) == 3) LED4_GPIO_CLK_DISABLE(); \
- }while(0)
-/**
- * @}
- */
-
-/** @addtogroup STM322xG_EVAL_LOW_LEVEL_BUTTON STM322xG EVAL LOW LEVEL BUTTON
- * @{
- */
-/* Joystick pins are connected to IO Expander (accessible through I2C1 interface) */
-#define BUTTONn 3
-
-/**
- * @brief Wakeup push-button
- */
-#define WAKEUP_BUTTON_PIN GPIO_PIN_0
-#define WAKEUP_BUTTON_GPIO_PORT GPIOA
-#define WAKEUP_BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
-#define WAKEUP_BUTTON_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
-#define WAKEUP_BUTTON_EXTI_IRQn EXTI0_IRQn
-
-/**
- * @brief Tamper push-button
- */
-#define TAMPER_BUTTON_PIN GPIO_PIN_13
-#define TAMPER_BUTTON_GPIO_PORT GPIOC
-#define TAMPER_BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
-#define TAMPER_BUTTON_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
-#define TAMPER_BUTTON_EXTI_IRQn EXTI15_10_IRQn
-
-/**
- * @brief Key push-button
- */
-#define KEY_BUTTON_PIN GPIO_PIN_15
-#define KEY_BUTTON_GPIO_PORT GPIOG
-#define KEY_BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOG_CLK_ENABLE()
-#define KEY_BUTTON_GPIO_CLK_DISABLE() __HAL_RCC_GPIOG_CLK_DISABLE()
-#define KEY_BUTTON_EXTI_IRQn EXTI15_10_IRQn
-
-#define BUTTONx_GPIO_CLK_ENABLE(__INDEX__) do{if((__INDEX__) == 0) WAKEUP_BUTTON_GPIO_CLK_ENABLE(); else \
- if((__INDEX__) == 1) TAMPER_BUTTON_GPIO_CLK_ENABLE(); else \
- if((__INDEX__) == 2) KEY_BUTTON_GPIO_CLK_ENABLE(); \
- }while(0)
-#define BUTTONx_GPIO_CLK_DISABLE(__INDEX__) do{if((__INDEX__) == 0) WAKEUP_BUTTON_GPIO_CLK_DISABLE(); else \
- if((__INDEX__) == 1) TAMPER_BUTTON_GPIO_CLK_DISABLE(); else \
- if ((__INDEX__) == 2) KEY_BUTTON_GPIO_CLK_DISABLE(); \
- }while(0)
-/**
- * @}
- */
-
-/** @addtogroup STM322xG_EVAL_LOW_LEVEL_COM STM322xG EVAL LOW LEVEL COM
- * @{
- */
-#define COMn 1
-
-/**
- * @brief Definition for COM port1, connected to USART3
- */
-#define EVAL_COM1 USART3
-#define EVAL_COM1_CLK_ENABLE() __HAL_RCC_USART3_CLK_ENABLE()
-#define EVAL_COM1_CLK_DISABLE() __HAL_RCC_USART3_CLK_DISABLE()
-
-#define EVAL_COM1_TX_PIN GPIO_PIN_10
-#define EVAL_COM1_TX_GPIO_PORT GPIOC
-#define EVAL_COM1_TX_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
-#define EVAL_COM1_TX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
-#define EVAL_COM1_TX_AF GPIO_AF7_USART3
-
-#define EVAL_COM1_RX_PIN GPIO_PIN_11
-#define EVAL_COM1_RX_GPIO_PORT GPIOC
-#define EVAL_COM1_RX_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
-#define EVAL_COM1_RX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
-#define EVAL_COM1_RX_AF GPIO_AF7_USART3
-
-#define EVAL_COM1_IRQn USART3_IRQn
-
-#define EVAL_COMx_CLK_ENABLE(__INDEX__) do{if((__INDEX__) == 0) EVAL_COM1_CLK_ENABLE(); \
- }while(0)
-#define EVAL_COMx_CLK_DISABLE(__INDEX__) do{if((__INDEX__) == 0) EVAL_COM1_CLK_DISABLE(); \
- }while(0)
-
-#define EVAL_COMx_TX_GPIO_CLK_ENABLE(__INDEX__) do{if((__INDEX__) == 0) EVAL_COM1_TX_GPIO_CLK_ENABLE(); \
- }while(0)
-#define EVAL_COMx_TX_GPIO_CLK_DISABLE(__INDEX__) do{if((__INDEX__) == 0) EVAL_COM1_TX_GPIO_CLK_DISABLE(); \
- }while(0)
-
-#define EVAL_COMx_RX_GPIO_CLK_ENABLE(__INDEX__) do{if((__INDEX__) == 0) EVAL_COM1_RX_GPIO_CLK_ENABLE(); \
- }while(0)
-#define EVAL_COMx_RX_GPIO_CLK_DISABLE(__INDEX__) do{if((__INDEX__) == 0) EVAL_COM1_RX_GPIO_CLK_DISABLE(); \
- }while(0)
-
-/**
- * @brief Definition for Potentiometer, connected to ADC3
- */
-#define ADCx ADC3
-#define ADCx_CLK_ENABLE() __HAL_RCC_ADC3_CLK_ENABLE()
-#define ADCx_CHANNEL_GPIO_CLK_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE()
-
-#define ADCx_FORCE_RESET() __HAL_RCC_ADC_FORCE_RESET()
-#define ADCx_RELEASE_RESET() __HAL_RCC_ADC_RELEASE_RESET()
-
-/* Definition for ADCx Channel Pin */
-#define ADCx_CHANNEL_PIN GPIO_PIN_9
-#define ADCx_CHANNEL_GPIO_PORT GPIOF
-
-/* Definition for ADCx's Channel */
-#define ADCx_CHANNEL ADC_CHANNEL_7
-#define SAMPLINGTIME ADC_SAMPLETIME_3CYCLES
-#define ADCx_POLL_TIMEOUT 10
-
-/**
- * @brief Joystick Pins definition
- */
-#define JOY_SEL_PIN IO_PIN_7
-#define JOY_DOWN_PIN IO_PIN_6
-#define JOY_LEFT_PIN IO_PIN_5
-#define JOY_RIGHT_PIN IO_PIN_4
-#define JOY_UP_PIN IO_PIN_3
-#define JOY_NONE_PIN JOY_ALL_PINS
-#define JOY_ALL_PINS (IO_PIN_3 | IO_PIN_4 | IO_PIN_5 | IO_PIN_6 | IO_PIN_7)
-
-/* Exported constantIO -------------------------------------------------------*/
-/* I2C clock speed configuration (in Hz)
- WARNING:
- Make sure that this define is not already declared in other files (ie.
- stm322xg_eval.h file). It can be used in parallel by other modules. */
-#ifndef BSP_I2C_SPEED
- #define BSP_I2C_SPEED 100000
-#endif /* BSP_I2C_SPEED */
-
-#define IO_I2C_ADDRESS 0x88
-#define TS_I2C_ADDRESS 0x82
-#define CAMERA_I2C_ADDRESS 0x60
-#define AUDIO_I2C_ADDRESS 0x94
-/* For M24C64 devices, E0, E1 and E2 pins are all used for device
- address selection (no need for additional address lines). According to the
- Hardware connection on the board (on STM322xG-EVAL board E0 = E1 = E2 = 0) */
-#define EEPROM_I2C_ADDRESS 0xA0
-
-/* User can use this section to tailor I2Cx/I2Cx instance used and associated
- resources */
-/* Definition for I2Cx clock resources */
-#define EVAL_I2Cx I2C1
-#define EVAL_I2Cx_CLK_ENABLE() __HAL_RCC_I2C1_CLK_ENABLE()
-#define EVAL_DMAx_CLK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE()
-#define EVAL_I2Cx_SCL_SDA_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
-
-#define EVAL_I2Cx_FORCE_RESET() __HAL_RCC_I2C1_FORCE_RESET()
-#define EVAL_I2Cx_RELEASE_RESET() __HAL_RCC_I2C1_RELEASE_RESET()
-
-/* Definition for I2Cx Pins */
-#define EVAL_I2Cx_SCL_PIN GPIO_PIN_6
-#define EVAL_I2Cx_SCL_SDA_GPIO_PORT GPIOB
-#define EVAL_I2Cx_SCL_SDA_AF GPIO_AF4_I2C1
-#define EVAL_I2Cx_SDA_PIN GPIO_PIN_9
-
-/* I2C interrupt requests */
-#define EVAL_I2Cx_EV_IRQn I2C1_EV_IRQn
-#define EVAL_I2Cx_ER_IRQn I2C1_ER_IRQn
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_LOW_LEVEL_Exported_Functions STM322xG EVAL LOW LEVEL Exported Functions
- * @{
- */
-uint32_t BSP_GetVersion(void);
-void BSP_LED_Init(Led_TypeDef Led);
-void BSP_LED_On(Led_TypeDef Led);
-void BSP_LED_Off(Led_TypeDef Led);
-void BSP_LED_Toggle(Led_TypeDef Led);
-void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Button_Mode);
-uint32_t BSP_PB_GetState(Button_TypeDef Button);
-void BSP_COM_Init(COM_TypeDef COM, UART_HandleTypeDef *huart);
-void BSP_POTENTIOMETER_Init(void);
-uint32_t BSP_POTENTIOMETER_GetLevel(void);
-uint8_t BSP_JOY_Init(JOYMode_TypeDef Joy_Mode);
-JOYState_TypeDef BSP_JOY_GetState(void);
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM322xG_EVAL_H */
-
diff --git a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_audio.c b/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_audio.c
deleted file mode 100644
index c324cc6a..00000000
--- a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_audio.c
+++ /dev/null
@@ -1,659 +0,0 @@
-/**
- ******************************************************************************
- * @file stm322xg_eval_audio.c
- * @author MCD Application Team
- * @brief This file provides the Audio driver for the STM322xG-EVAL evaluation
- * board.
- ******************************************************************************
- * @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.
- *
- ******************************************************************************
- */
-
-/*==============================================================================
- User NOTES
-How To use this driver:
------------------------
- + This driver supports STM32F2xx devices on STM322xG-EVAL Evaluation board.
- + Call the function BSP_AUDIO_OUT_Init(
- OutputDevice: physical output mode (OUTPUT_DEVICE_SPEAKER,
- OUTPUT_DEVICE_HEADPHONE, OUTPUT_DEVICE_AUTO or
- OUTPUT_DEVICE_BOTH)
- Volume: initial volume to be set (0 is min (mute), 100 is max (100%)
- AudioFreq: Audio frequency in Hz (8000, 16000, 22500, 32000 ...)
- this parameter is relative to the audio file/stream type.
- )
- This function configures all the hardware required for the audio application (codec, I2C, I2S,
- GPIOs, DMA and interrupt if needed). This function returns 0 if configuration is OK.
- If the returned value is different from 0 or the function is stuck then the communication with
- the codec or the IOExpander has failed (try to un-plug the power or reset device in this case).
- - OUTPUT_DEVICE_SPEAKER: only speaker will be set as output for the audio stream.
- - OUTPUT_DEVICE_HEADPHONE: only headphones will be set as output for the audio stream.
- - OUTPUT_DEVICE_AUTO: Selection of output device is made through external switch (implemented
- into the audio jack on the evaluation board). When the Headphone is connected it is used
- as output. When the headphone is disconnected from the audio jack, the output is
- automatically switched to Speaker.
- - OUTPUT_DEVICE_BOTH: both Speaker and Headphone are used as outputs for the audio stream
- at the same time.
- + Call the function BSP_AUDIO_OUT_Play(
- pBuffer: pointer to the audio data file address
- Size: size of the buffer to be sent in Bytes
- )
- to start playing (for the first time) from the audio file/stream.
- + Call the function BSP_AUDIO_OUT_Pause() to pause playing
- + Call the function BSP_AUDIO_OUT_Resume() to resume playing.
- Note. After calling BSP_AUDIO_OUT_Pause() function for pause, only BSP_AUDIO_OUT_Resume() should be called
- for resume (it is not allowed to call BSP_AUDIO_OUT_Play() in this case).
- Note. This function should be called only when the audio file is played or paused (not stopped).
- + For each mode, you may need to implement the relative callback functions into your code.
- The Callback functions are named AUDIO_OUT_XXX_CallBack() and only their prototypes are declared in
- the stm322xg_eval_audio.h file. (refer to the example for more details on the callbacks implementations)
- + To Stop playing, to modify the volume level or to mute, use the functions
- BSP_AUDIO_OUT_Stop(), BSP_AUDIO_OUT_SetVolume(), AUDIO_OUT_SetFrequency() BSP_AUDIO_OUT_SetOutputMode and BSP_AUDIO_OUT_SetMute().
- + The driver API and the callback functions are at the end of the stm322xg_eval_audio.h file.
-
-Driver architecture:
- -------------------
- + This driver provide the High Audio Layer: consists of the function API exported in the stm322xg_eval_audio.h file
- (BSP_AUDIO_OUT_Init(), BSP_AUDIO_OUT_Play() ...)
- + This driver provide also the Media Access Layer (MAL): which consists of functions allowing to access the media containing/
- providing the audio file/stream. These functions are also included as local functions into
- the stm322xg_eval_audio_codec.c file (I2Sx_MspInit() and I2Sx_Init())
-
- Known Limitations:
--------------------
- 1- When using the Speaker, if the audio file quality is not high enough, the speaker output
- may produce high and uncomfortable noise level. To avoid this issue, to use speaker
- output properly, try to increase audio file sampling rate (typically higher than 48KHz).
- This operation will lead to larger file size.
- 2- Communication with the audio codec (through I2C) may be corrupted if it is interrupted by some
- user interrupt routines (in this case, interrupts could be disabled just before the start of
- communication then re-enabled when it is over). Note that this communication is only done at
- the configuration phase (BSP_AUDIO_OUT_Init() or BSP_AUDIO_OUT_Stop()) and when Volume control modification is
- performed (BSP_AUDIO_OUT_SetVolume() or AUDIO_OUT_Mute() or BSP_AUDIO_OUT_SetOutputMode()).
- When the audio data is played, no communication is required with the audio codec.
- 3- Parsing of audio file is not implemented (in order to determine audio file properties: Mono/Stereo, Data size,
- File size, Audio Frequency, Audio Data header size ...). The configuration is fixed for the given audio file.
- 4- Supports only Stereo audio streaming. To play mono audio streams, each data should be sent twice
- on the I2S or should be duplicated on the source buffer. Or convert the stream in stereo before playing.
- 5- Supports only 16-bits audio data size.
-==============================================================================*/
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm322xg_eval_audio.h"
-#include "stm322xg_eval_io.h" /* IOExpander driver is included in order to allow
- CS43L22 codec reset pin managment on the evaluation board */
-/** @addtogroup BSP
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_AUDIO STM322xG EVAL AUDIO
- * @brief This file includes the low layer audio driver available on STM322xG-EVAL
- * evaluation board.
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_AUDIO_Private_Defines STM322xG EVAL AUDIO Private Defines
- * @{
- */
-/* These PLL parameters are valide when the f(VCO clock) = 1Mhz */
-const uint32_t I2SFreq[8] = {8000, 11025, 16000, 22050, 32000, 44100, 48000, 96000};
-const uint32_t I2SPLLN[8] = {256, 429, 213, 429, 426, 271, 258, 344};
-const uint32_t I2SPLLR[8] = {5, 4, 4, 4, 4, 6, 3, 1};
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_AUDIO_Private_Variables STM322xG EVAL AUDIO Private Variables
- * @{
- */
-AUDIO_DrvTypeDef *audio_drv;
-I2S_HandleTypeDef haudio_i2s;
-
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_AUDIO_Private_Function_Prototypes STM322xG EVAL AUDIO Private Function Prototypes
- * @{
- */
-static void I2Sx_Init(uint32_t AudioFreq);
-static void I2Sx_DeInit(void);
-static void CODEC_Reset(void);
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_AUDIO_Private_Functions STM322xG EVAL AUDIO Private Functions
- * @{
- */
-
-/**
- * @brief Configures the audio peripherals.
- * @param OutputDevice: OUTPUT_DEVICE_SPEAKER, OUTPUT_DEVICE_HEADPHONE,
- * OUTPUT_DEVICE_BOTH or OUTPUT_DEVICE_AUTO .
- * @param Volume: Initial volume level (from 0 (Mute) to 100 (Max))
- * @param AudioFreq: Audio frequency used to play the audio stream.
- * @note This function configure also that the I2S PLL input clock.
- * @retval 0 if correct communication, else wrong communication
- */
-uint8_t BSP_AUDIO_OUT_Init(uint16_t OutputDevice, uint8_t Volume, uint32_t AudioFreq)
-{
- uint8_t ret = AUDIO_ERROR;
-
- /* Disable I2S */
- I2Sx_DeInit();
-
- /* Configure PLL clock depending on AudioFreq */
- BSP_AUDIO_OUT_ClockConfig(&haudio_i2s, AudioFreq, NULL);
-
- /* I2S data transfer preparation:
- Prepare the Media to be used for the audio transfer from memory to I2S peripheral */
- haudio_i2s.Instance = AUDIO_I2Sx;
- if(HAL_I2S_GetState(&haudio_i2s) == HAL_I2S_STATE_RESET)
- {
- /* Init the I2S MSP: this __weak function can be redefined by the application*/
- BSP_AUDIO_OUT_MspInit(&haudio_i2s, NULL);
- }
- /* Configure the I2S peripheral */
- I2Sx_Init(AudioFreq);
-
- /* Reset the Codec Registers */
- CODEC_Reset();
-
- if(((cs43l22_drv.ReadID(AUDIO_I2C_ADDRESS)) & CS43L22_ID_MASK) == CS43L22_ID)
- {
- /* Initialize the audio driver structure */
- audio_drv = &cs43l22_drv;
- ret = AUDIO_OK;
- }
- else
- {
- ret = AUDIO_ERROR;
- }
-
- if(ret == AUDIO_OK)
- {
- audio_drv->Init(AUDIO_I2C_ADDRESS, OutputDevice, Volume, AudioFreq);
- }
-
- return ret;
-}
-
-/**
- * @brief De-initialize the audio peripherals.
- * @retval None
- */
-void BSP_AUDIO_OUT_DeInit(void)
-{
- I2Sx_DeInit();
- /* DeInit the I2S MSP : this __weak function can be rewritten by the application */
- BSP_AUDIO_OUT_MspDeInit(&haudio_i2s, NULL);
-}
-
-/**
- * @brief Starts playing audio stream from a data buffer for a determined size.
- * @param pBuffer: Pointer to the buffer
- * @param Size: Number of audio data BYTES.
- * @retval AUDIO_OK if correct communication, else wrong communication
- */
-uint8_t BSP_AUDIO_OUT_Play(uint16_t* pBuffer, uint32_t Size)
-{
- /* Call the audio Codec Play function */
- if(audio_drv->Play(AUDIO_I2C_ADDRESS, pBuffer, Size) != 0)
- {
- return AUDIO_ERROR;
- }
- else
- {
- /* Update the Media layer and enable it for play */
- HAL_I2S_Transmit_DMA(&haudio_i2s, pBuffer, DMA_MAX(Size/AUDIODATA_SIZE));
- return AUDIO_OK;
- }
-}
-
-/**
- * @brief Sends n-Bytes on the I2S interface.
- * @param pData: Pointer to data address
- * @param Size: Number of data to be written.
- */
-void BSP_AUDIO_OUT_ChangeBuffer(uint16_t *pData, uint16_t Size)
-{
- HAL_I2S_Transmit_DMA(&haudio_i2s, pData, Size);
-}
-
-/**
- * @brief Pauses the audio file stream.
- * In case of using DMA, the DMA Pause feature is used.
- * WARNING: When calling BSP_AUDIO_OUT_Pause() function for pause, only
- * BSP_AUDIO_OUT_Resume() function should be called for resume (use of BSP_AUDIO_OUT_Play()
- * function for resume could lead to unexpected behavior).
- * @retval AUDIO_OK if correct communication, else wrong communication
- */
-uint8_t BSP_AUDIO_OUT_Pause(void)
-{
- /* Call the Audio Codec Pause/Resume function */
- if(audio_drv->Pause(AUDIO_I2C_ADDRESS) != 0)
- {
- return AUDIO_ERROR;
- }
- else
- {
- /* Call the Media layer pause function */
- HAL_I2S_DMAPause(&haudio_i2s);
-
- /* Return AUDIO_OK when all operations are correctly done */
- return AUDIO_OK;
- }
-}
-
-/**
- * @brief Resumes the audio file stream.
- * WARNING: When calling BSP_AUDIO_OUT_Pause() function for pause, only
- * BSP_AUDIO_OUT_Resume() function should be called for resume (use of BSP_AUDIO_OUT_Play()
- * function for resume could lead to unexpected behavior).
- * @retval AUDIO_OK if correct communication, else wrong communication
- */
-uint8_t BSP_AUDIO_OUT_Resume(void)
-{
- /* Call the Audio Codec Pause/Resume function */
- if(audio_drv->Resume(AUDIO_I2C_ADDRESS) != 0)
- {
- return AUDIO_ERROR;
- }
- else
- {
- /* Call the Media layer pause/resume function */
- HAL_I2S_DMAResume(&haudio_i2s);
-
- /* Return AUDIO_OK when all operations are correctly done */
- return AUDIO_OK;
- }
-}
-
-/**
- * @brief Stops audio playing and Power down the Audio Codec.
- * @param Option: could be one of the following parameters
- * - CODEC_PDWN_SW: for software power off (by writing registers).
- * Then no need to reconfigure the Codec after power on.
- * - CODEC_PDWN_HW: completely shut down the codec (physically).
- * Then need to reconfigure the Codec after power on.
- * @retval AUDIO_OK if correct communication, else wrong communication
- */
-uint8_t BSP_AUDIO_OUT_Stop(uint32_t Option)
-{
- /* Call the Media layer stop function */
- HAL_I2S_DMAStop(&haudio_i2s);
-
- /* Call Audio Codec Stop function */
- if(audio_drv->Stop(AUDIO_I2C_ADDRESS, Option) != 0)
- {
- return AUDIO_ERROR;
- }
- else
- {
- if(Option == CODEC_PDWN_HW)
- {
- /* Wait at least 1ms */
- HAL_Delay(1);
-
- /* Reset the pin */
- BSP_IO_WritePin(AUDIO_RESET_PIN, RESET);
- }
-
- /* Return AUDIO_OK when all operations are correctly done */
- return AUDIO_OK;
- }
-}
-
-/**
- * @brief Controls the current audio volume level.
- * @param Volume: Volume level to be set in percentage from 0% to 100% (0 for
- * Mute and 100 for Max volume level).
- * @retval AUDIO_OK if correct communication, else wrong communication
- */
-uint8_t BSP_AUDIO_OUT_SetVolume(uint8_t Volume)
-{
- /* Call the codec volume control function with converted volume value */
- if(audio_drv->SetVolume(AUDIO_I2C_ADDRESS, Volume) != 0)
- {
- return AUDIO_ERROR;
- }
- else
- {
- /* Return AUDIO_OK when all operations are correctly done */
- return AUDIO_OK;
- }
-}
-
-/**
- * @brief Enables or disables the MUTE mode by software
- * @param Cmd: could be AUDIO_MUTE_ON to mute sound or AUDIO_MUTE_OFF to
- * unmute the codec and restore previous volume level.
- * @retval AUDIO_OK if correct communication, else wrong communication
- */
-uint8_t BSP_AUDIO_OUT_SetMute(uint32_t Cmd)
-{
- /* Call the Codec Mute function */
- if(audio_drv->SetMute(AUDIO_I2C_ADDRESS, Cmd) != 0)
- {
- return AUDIO_ERROR;
- }
- else
- {
- /* Return AUDIO_OK when all operations are correctly done */
- return AUDIO_OK;
- }
-}
-
-/**
- * @brief Switch dynamically (while audio file is played) the output target
- * (speaker or headphone).
- * @note This function modifies a global variable of the audio codec driver: OutputDev.
- * @param Output: specifies the audio output target: OUTPUT_DEVICE_SPEAKER,
- * OUTPUT_DEVICE_HEADPHONE, OUTPUT_DEVICE_BOTH or OUTPUT_DEVICE_AUTO
- * @retval AUDIO_OK if correct communication, else wrong communication
- */
-uint8_t BSP_AUDIO_OUT_SetOutputMode(uint8_t Output)
-{
- /* Call the Codec output Device function */
- if(audio_drv->SetOutputMode(AUDIO_I2C_ADDRESS, Output) != 0)
- {
- return AUDIO_ERROR;
- }
- else
- {
- /* Return AUDIO_OK when all operations are correctly done */
- return AUDIO_OK;
- }
-}
-
-/**
- * @brief Updates the audio frequency.
- * @param AudioFreq: Audio frequency used to play the audio stream.
- * @retval AUDIO_OK if correct communication, else wrong communication
- */
-void BSP_AUDIO_OUT_SetFrequency(uint32_t AudioFreq)
-{
- /* Configure PLL clock depending on AudioFreq */
- BSP_AUDIO_OUT_ClockConfig(&haudio_i2s, AudioFreq, NULL);
-
- /* Update the I2S audio frequency configuration */
- I2Sx_Init(AudioFreq);
-}
-
-/**
- * @brief Clock Config.
- * @param hi2s: might be required to set audio peripheral predivider if any.
- * @param AudioFreq: Audio frequency used to play the audio stream.
- * @param Params
- * @note This API is called by BSP_AUDIO_OUT_Init() and BSP_AUDIO_OUT_SetFrequency()
- * Being __weak it can be overwritten by the application
- * @retval None
- */
-__weak void BSP_AUDIO_OUT_ClockConfig(I2S_HandleTypeDef *hi2s, uint32_t AudioFreq, void *Params)
-{
- RCC_PeriphCLKInitTypeDef RCC_ExCLKInitStruct;
- uint8_t index = 0, freqindex = 0xFF;
-
- for(index = 0; index < 8; index++)
- {
- if(I2SFreq[index] == AudioFreq)
- {
- freqindex = index;
- }
- }
- HAL_RCCEx_GetPeriphCLKConfig(&RCC_ExCLKInitStruct);
- if(freqindex != 0xFF)
- {
- /* I2S clock config
- PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) (PLLI2SN/PLLM)
- I2SCLK = f(PLLI2S clock output) = f(VCO clock) / PLLI2SR */
- RCC_ExCLKInitStruct.PeriphClockSelection = RCC_PERIPHCLK_I2S;
- RCC_ExCLKInitStruct.PLLI2S.PLLI2SN = I2SPLLN[freqindex];
- RCC_ExCLKInitStruct.PLLI2S.PLLI2SR = I2SPLLR[freqindex];
- HAL_RCCEx_PeriphCLKConfig(&RCC_ExCLKInitStruct);
- }
- else /* Default PLL I2S configuration */
- {
- /* I2S clock config
- PLLI2S_VCO = f(VCO clock) = f(PLLI2S clock input) (PLLI2SN/PLLM)
- I2SCLK = f(PLLI2S clock output) = f(VCO clock) / PLLI2SR */
- RCC_ExCLKInitStruct.PeriphClockSelection = RCC_PERIPHCLK_I2S;
- RCC_ExCLKInitStruct.PLLI2S.PLLI2SN = 258;
- RCC_ExCLKInitStruct.PLLI2S.PLLI2SR = 3;
- HAL_RCCEx_PeriphCLKConfig(&RCC_ExCLKInitStruct);
- }
-}
-
-/**
- * @brief Initializes BSP_AUDIO_OUT MSP.
- * @param hi2s: I2S handle
- * @param Params
- */
-__weak void BSP_AUDIO_OUT_MspInit(I2S_HandleTypeDef *hi2s, void *Params)
-{
- static DMA_HandleTypeDef hdma_i2sTx;
- GPIO_InitTypeDef GPIO_InitStruct;
-
- /* Enable I2S clock */
- AUDIO_I2Sx_CLK_ENABLE();
-
- /* Enable SCK, SD and WS GPIO clock */
- AUDIO_I2Sx_SCK_SD_WS_CLK_ENABLE();
-
- /* CODEC_I2S pins configuration: WS, SCK and SD pins */
- GPIO_InitStruct.Pin = AUDIO_I2Sx_WS_PIN | AUDIO_I2Sx_SCK_PIN | AUDIO_I2Sx_SD_PIN;
- GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- GPIO_InitStruct.Speed = GPIO_SPEED_FAST;
- GPIO_InitStruct.Alternate = AUDIO_I2Sx_SCK_SD_WS_AF;
- HAL_GPIO_Init(AUDIO_I2Sx_SCK_SD_WS_GPIO_PORT, &GPIO_InitStruct);
-
- /* Enable MCK GPIO clock */
- AUDIO_I2Sx_MCK_CLK_ENABLE();
-
- /* CODEC_I2S pins configuration: MCK pin */
- GPIO_InitStruct.Pin = AUDIO_I2Sx_MCK_PIN;
- HAL_GPIO_Init(AUDIO_I2Sx_MCK_GPIO_PORT, &GPIO_InitStruct);
-
- /* Enable the DMA clock */
- AUDIO_I2Sx_DMAx_CLK_ENABLE();
-
- if(hi2s->Instance == AUDIO_I2Sx)
- {
- /* Configure the hdma_i2sTx handle parameters */
- hdma_i2sTx.Init.Channel = AUDIO_I2Sx_DMAx_CHANNEL;
- hdma_i2sTx.Init.Direction = DMA_MEMORY_TO_PERIPH;
- hdma_i2sTx.Init.PeriphInc = DMA_PINC_DISABLE;
- hdma_i2sTx.Init.MemInc = DMA_MINC_ENABLE;
- hdma_i2sTx.Init.PeriphDataAlignment = AUDIO_I2Sx_DMAx_PERIPH_DATA_SIZE;
- hdma_i2sTx.Init.MemDataAlignment = AUDIO_I2Sx_DMAx_MEM_DATA_SIZE;
- hdma_i2sTx.Init.Mode = DMA_NORMAL;
- hdma_i2sTx.Init.Priority = DMA_PRIORITY_HIGH;
- hdma_i2sTx.Init.FIFOMode = DMA_FIFOMODE_ENABLE;
- hdma_i2sTx.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL;
- hdma_i2sTx.Init.MemBurst = DMA_MBURST_SINGLE;
- hdma_i2sTx.Init.PeriphBurst = DMA_PBURST_SINGLE;
-
- hdma_i2sTx.Instance = AUDIO_I2Sx_DMAx_STREAM;
-
- /* Associate the DMA handle */
- __HAL_LINKDMA(hi2s, hdmatx, hdma_i2sTx);
-
- /* Deinitialize the Stream for new transfer */
- HAL_DMA_DeInit(&hdma_i2sTx);
-
- /* Configure the DMA Stream */
- HAL_DMA_Init(&hdma_i2sTx);
- }
-
- /* I2S DMA IRQ Channel configuration */
- HAL_NVIC_SetPriority(AUDIO_I2Sx_DMAx_IRQ, AUDIO_IRQ_PREPRIO, 0);
- HAL_NVIC_EnableIRQ(AUDIO_I2Sx_DMAx_IRQ);
-}
-
-/**
- * @brief De-Initializes BSP_AUDIO_OUT MSP.
- * @param hi2s: I2S handle
- * @param Params
- */
-__weak void BSP_AUDIO_OUT_MspDeInit(I2S_HandleTypeDef *hi2s, void *Params)
-{
- GPIO_InitTypeDef GPIO_InitStruct;
-
- /* Disable I2S clock */
- AUDIO_I2Sx_CLK_DISABLE();
-
- /* CODEC_I2S pins configuration: WS, SCK and SD pins */
- GPIO_InitStruct.Pin = AUDIO_I2Sx_WS_PIN | AUDIO_I2Sx_SCK_PIN | AUDIO_I2Sx_SD_PIN;
- HAL_GPIO_DeInit(AUDIO_I2Sx_SCK_SD_WS_GPIO_PORT, GPIO_InitStruct.Pin);
-
- /* CODEC_I2S pins configuration: MCK pin */
- GPIO_InitStruct.Pin = AUDIO_I2Sx_MCK_PIN;
- HAL_GPIO_DeInit(AUDIO_I2Sx_MCK_GPIO_PORT, GPIO_InitStruct.Pin);
-}
-
-/**
- * @brief Tx Transfer completed callbacks
- * @param hi2s: I2S handle
- */
-void HAL_I2S_TxCpltCallback(I2S_HandleTypeDef *hi2s)
-{
- /* Manage the remaining file size and new address offset: This function
- should be coded by user (its prototype is already declared in stm322xg_eval_audio.h) */
- BSP_AUDIO_OUT_TransferComplete_CallBack();
-}
-
-/**
- * @brief Tx Transfer Half completed callbacks
- * @param hi2s: I2S handle
- */
-void HAL_I2S_TxHalfCpltCallback(I2S_HandleTypeDef *hi2s)
-{
- /* Manage the remaining file size and new address offset: This function
- should be coded by user (its prototype is already declared in stm322xg_eval_audio.h) */
- BSP_AUDIO_OUT_HalfTransfer_CallBack();
-}
-
-/**
- * @brief I2S error callbacks.
- * @param hi2s: I2S handle
- */
-void HAL_I2S_ErrorCallback(I2S_HandleTypeDef *hi2s)
-{
- BSP_AUDIO_OUT_Error_CallBack();
-}
-
-/**
- * @brief Manages the DMA full Transfer complete event.
- */
-__weak void BSP_AUDIO_OUT_TransferComplete_CallBack(void)
-{
-}
-
-/**
- * @brief Manages the DMA Half Transfer complete event.
- */
-__weak void BSP_AUDIO_OUT_HalfTransfer_CallBack(void)
-{
-}
-
-/**
- * @brief Manages the DMA FIFO error event.
- */
-__weak void BSP_AUDIO_OUT_Error_CallBack(void)
-{
-}
-
-/*******************************************************************************
- Static Functions
-*******************************************************************************/
-/**
- * @brief Initializes the Audio Codec audio interface (I2S).
- * @param AudioFreq: Audio frequency to be configured for the I2S peripheral.
- */
-static void I2Sx_Init(uint32_t AudioFreq)
-{
- /* Initialize the haudio_i2s Instance parameter */
- haudio_i2s.Instance = AUDIO_I2Sx;
-
- /* Disable I2S block */
- __HAL_I2S_DISABLE(&haudio_i2s);
-
- haudio_i2s.Init.Mode = I2S_MODE_MASTER_TX;
- haudio_i2s.Init.Standard = I2S_STANDARD;
- haudio_i2s.Init.DataFormat = I2S_DATAFORMAT_16B;
- haudio_i2s.Init.AudioFreq = AudioFreq;
- haudio_i2s.Init.CPOL = I2S_CPOL_LOW;
- haudio_i2s.Init.MCLKOutput = I2S_MCLKOUTPUT_ENABLE;
-
- /* Init the I2S */
- HAL_I2S_Init(&haudio_i2s);
-}
-
-/**
- * @brief Deinitialize the Audio Codec audio interface (I2S).
- */
-static void I2Sx_DeInit(void)
-{
- /* Initialize the haudio_i2s Instance parameter */
- haudio_i2s.Instance = AUDIO_I2Sx;
-
- /* Disable I2S peripheral */
- __HAL_I2S_DISABLE(&haudio_i2s);
-
- HAL_I2S_DeInit(&haudio_i2s);
-}
-
-/**
- * @brief Resets the audio codec. It restores the default configuration of the
- * codec (this function shall be called before initializing the codec).
- * @note This function calls an external driver function: The IO Expander driver.
- */
-static void CODEC_Reset(void)
-{
- /* Configure the IO Expander (to use the Codec Reset pin mapped on the IOExpander) */
- BSP_IO_Init();
-
- BSP_IO_ConfigPin(AUDIO_RESET_PIN, IO_MODE_OUTPUT);
-
- /* Power Down the codec */
- BSP_IO_WritePin(AUDIO_RESET_PIN, RESET);
-
- /* Wait for a delay to insure registers erasing */
- HAL_Delay(CODEC_RESET_DELAY);
-
- /* Power on the codec */
- BSP_IO_WritePin(AUDIO_RESET_PIN, SET);
-
- /* Wait for a delay to insure registers erasing */
- HAL_Delay(CODEC_RESET_DELAY);
-}
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
diff --git a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_audio.h b/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_audio.h
deleted file mode 100644
index 3144cba8..00000000
--- a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_audio.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/**
- ******************************************************************************
- * @file stm322xg_eval_audio.h
- * @author MCD Application Team
- * @brief This file contains the common defines and functions prototypes for
- * the stm322xg_eval_audio.c 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 __STM322xG_EVAL_AUDIO_H
-#define __STM322xG_EVAL_AUDIO_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "../Components/cs43l22/cs43l22.h"
-#include "stm322xg_eval.h"
-
-/** @addtogroup BSP
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL_AUDIO
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_AUDIO_Exported_Constants STM322xG EVAL AUDIO Exported Constants
- * @{
- */
-/* Audio Reset Pin definition */
-#define AUDIO_RESET_PIN IO_PIN_2
-
-/* I2S peripheral configuration defines */
-#define AUDIO_I2Sx SPI2
-#define AUDIO_I2Sx_CLK_ENABLE() __HAL_RCC_SPI2_CLK_ENABLE()
-#define AUDIO_I2Sx_CLK_DISABLE() __HAL_RCC_SPI2_CLK_DISABLE()
-#define AUDIO_I2Sx_SCK_SD_WS_AF GPIO_AF5_SPI2
-#define AUDIO_I2Sx_SCK_SD_WS_CLK_ENABLE() __HAL_RCC_GPIOI_CLK_ENABLE()
-#define AUDIO_I2Sx_MCK_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
-#define AUDIO_I2Sx_WS_PIN GPIO_PIN_0
-#define AUDIO_I2Sx_SCK_PIN GPIO_PIN_1
-#define AUDIO_I2Sx_SD_PIN GPIO_PIN_3
-#define AUDIO_I2Sx_MCK_PIN GPIO_PIN_6
-#define AUDIO_I2Sx_SCK_SD_WS_GPIO_PORT GPIOI
-#define AUDIO_I2Sx_MCK_GPIO_PORT GPIOC
-
-/* I2S DMA Stream definitions */
-#define AUDIO_I2Sx_DMAx_CLK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE()
-#define AUDIO_I2Sx_DMAx_STREAM DMA1_Stream4
-#define AUDIO_I2Sx_DMAx_CHANNEL DMA_CHANNEL_0
-#define AUDIO_I2Sx_DMAx_IRQ DMA1_Stream4_IRQn
-#define AUDIO_I2Sx_DMAx_PERIPH_DATA_SIZE DMA_PDATAALIGN_HALFWORD
-#define AUDIO_I2Sx_DMAx_MEM_DATA_SIZE DMA_MDATAALIGN_HALFWORD
-#define DMA_MAX_SZE 0xFFFF
-
-#define AUDIO_I2Sx_DMAx_IRQHandler DMA1_Stream4_IRQHandler
-
-/*------------------------------------------------------------------------------
- CONFIGURATION: Audio Driver Configuration parameters
-------------------------------------------------------------------------------*/
-/* Select the interrupt preemption priority for the DMA interrupt */
-#define AUDIO_IRQ_PREPRIO 0x0F /* Select the preemption priority level(0 is the highest) */
-
-#define AUDIODATA_SIZE 2 /* 16-bits audio data size */
-
-/* Audio status definition */
-#define AUDIO_OK 0x00
-#define AUDIO_ERROR 0x01
-#define AUDIO_TIMEOUT 0x02
-
-/*------------------------------------------------------------------------------
- OPTIONAL Configuration defines parameters
-------------------------------------------------------------------------------*/
-/* Delay for the Codec to be correctly reset */
-#define CODEC_RESET_DELAY 5
-
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_AUDIO_Exported_Macros STM322xG EVAL AUDIO Exported Macros
- * @{
- */
-#define DMA_MAX(x) (((x) <= DMA_MAX_SZE)? (x):DMA_MAX_SZE)
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_AUDIO_Exported_Functions STM322xG EVAL AUDIO Exported Functions
- * @{
- */
-uint8_t BSP_AUDIO_OUT_Init(uint16_t OutputDevice, uint8_t Volume, uint32_t AudioFreq);
-void BSP_AUDIO_OUT_DeInit(void);
-uint8_t BSP_AUDIO_OUT_Play(uint16_t *pBuffer, uint32_t Size);
-void BSP_AUDIO_OUT_ChangeBuffer(uint16_t *pData, uint16_t Size);
-uint8_t BSP_AUDIO_OUT_Pause(void);
-uint8_t BSP_AUDIO_OUT_Resume(void);
-uint8_t BSP_AUDIO_OUT_Stop(uint32_t Option);
-uint8_t BSP_AUDIO_OUT_SetVolume(uint8_t Volume);
-void BSP_AUDIO_OUT_SetFrequency(uint32_t AudioFreq);
-uint8_t BSP_AUDIO_OUT_SetMute(uint32_t Cmd);
-uint8_t BSP_AUDIO_OUT_SetOutputMode(uint8_t Output);
-
-/* User Callbacks: user has to implement these functions in his code if they are needed. */
-/* This function is called when the requested data has been completely transferred.*/
-void BSP_AUDIO_OUT_TransferComplete_CallBack(void);
-
-/* This function is called when half of the requested buffer has been transferred. */
-void BSP_AUDIO_OUT_HalfTransfer_CallBack(void);
-
-/* This function is called when an Interrupt due to transfer error on or peripheral
- error occurs. */
-void BSP_AUDIO_OUT_Error_CallBack(void);
-
-/* These function can be modified in case the current settings (e.g. DMA stream)
- need to be changed for specific application needs */
-void BSP_AUDIO_OUT_ClockConfig(I2S_HandleTypeDef *hi2s, uint32_t AudioFreq, void *Params);
-void BSP_AUDIO_OUT_MspInit(I2S_HandleTypeDef *hi2s, void *Params);
-void BSP_AUDIO_OUT_MspDeInit(I2S_HandleTypeDef *hi2s, void *Params);
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM322xG_EVAL_AUDIO_H */
-
diff --git a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_camera.c b/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_camera.c
deleted file mode 100644
index db41036e..00000000
--- a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_camera.c
+++ /dev/null
@@ -1,463 +0,0 @@
-/**
- ******************************************************************************
- * @file stm322xg_eval_camera.c
- * @author MCD Application Team
- * @brief This file includes the driver for Camera module mounted on
- * STM322xG-EVAL evaluation board(MB786).
- ******************************************************************************
- * @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.
- *
- ******************************************************************************
- */
-
-/* File Info: ------------------------------------------------------------------
- User NOTES
-1. How to use this driver:
---------------------------
- - This driver is used to drive the Camera.
- - The OV2640 component driver MUST be included with this driver.
-
-2. Driver description:
----------------------
- + Initialization steps:
- o Initialize the Camera using the BSP_CAMERA_Init() function.
- o Start the Camera capture or snapshot using CAMERA_Start() function.
- o Suspend, resume or stop the Camera capture using the following functions:
- - BSP_CAMERA_Suspend()
- - BSP_CAMERA_Resume()
- - BSP_CAMERA_Stop()
-
- + Options
- o Increase or decrease on the fly the brightness and/or contrast
- using the following function:
- - BSP_CAMERA_ContrastBrightnessConfig
- o Add a special effect on the fly using the following functions:
- - BSP_CAMERA_BlackWhiteConfig()
- - BSP_CAMERA_ColorEffectConfig()
-
-------------------------------------------------------------------------------*/
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm322xg_eval_camera.h"
-
-/** @addtogroup BSP
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_CAMERA STM322xG EVAL CAMERA
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_CAMERA_Private_Variables STM322xG EVAL CAMERA Private Variables
- * @{
- */
-DCMI_HandleTypeDef hdcmi_eval;
-CAMERA_DrvTypeDef *camera_drv;
-uint32_t current_resolution;
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_CAMERA_Private_FunctionPrototypes STM322xG EVAL CAMERA Private FunctionPrototypes
- * @{
- */
-static uint32_t GetSize(uint32_t resolution);
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_CAMERA_Private_Functions STM322xG EVAL CAMERA Private Functions
- * @{
- */
-
-/**
- * @brief Initializes the Camera.
- * @param Resolution: Camera resolution
- * @retval Camera status
- */
-uint8_t BSP_CAMERA_Init(uint32_t Resolution)
-{
- DCMI_HandleTypeDef *phdcmi;
- uint8_t ret = CAMERA_ERROR;
-
- /* Get the DCMI handle structure */
- phdcmi = &hdcmi_eval;
-
- /*** Configures the DCMI to interface with the Camera module ***/
- /* DCMI configuration */
- phdcmi->Init.CaptureRate = DCMI_CR_ALL_FRAME;
- phdcmi->Init.HSPolarity = DCMI_HSPOLARITY_LOW;
- phdcmi->Init.SynchroMode = DCMI_SYNCHRO_HARDWARE;
- phdcmi->Init.VSPolarity = DCMI_VSPOLARITY_LOW;
- phdcmi->Init.ExtendedDataMode = DCMI_EXTEND_DATA_8B;
- phdcmi->Init.PCKPolarity = DCMI_PCKPOLARITY_RISING;
- phdcmi->Instance = DCMI;
-
- /* DCMI Initialization */
- BSP_CAMERA_MspInit();
- HAL_DCMI_Init(phdcmi);
-
- if(ov2640_drv.ReadID(CAMERA_I2C_ADDRESS) == OV2640_ID)
- {
- /* Initialize the Camera driver structure */
- camera_drv = &ov2640_drv;
-
- /* Camera Init */
- camera_drv->Init(CAMERA_I2C_ADDRESS, Resolution);
-
- /* Return CAMERA_OK status */
- ret = CAMERA_OK;
- }
-
- current_resolution = Resolution;
-
- return ret;
-}
-
-/**
- * @brief Starts the Camera capture in continuous mode.
- * @param buff: pointer to the Camera output buffer
- */
-void BSP_CAMERA_ContinuousStart(uint8_t *buff)
-{
- /* Start the Camera capture */
- HAL_DCMI_Start_DMA(&hdcmi_eval, DCMI_MODE_CONTINUOUS, (uint32_t)buff, GetSize(current_resolution));
-}
-
-/**
- * @brief Starts the Camera capture in snapshot mode.
- * @param buff: pointer to the Camera output buffer
- */
-void BSP_CAMERA_SnapshotStart(uint8_t *buff)
-{
- /* Start the Camera capture */
- HAL_DCMI_Start_DMA(&hdcmi_eval, DCMI_MODE_SNAPSHOT, (uint32_t)buff, GetSize(current_resolution));
-}
-
-/**
- * @brief Suspends the Camera capture.
- */
-void BSP_CAMERA_Suspend(void)
-{
- /* Suspend the Camera Capture */
- HAL_DCMI_Suspend(&hdcmi_eval);
-}
-
-/**
- * @brief Resumes the Camera capture.
- */
-void BSP_CAMERA_Resume(void)
-{
- /* Start the Camera Capture */
- HAL_DCMI_Resume(&hdcmi_eval);
-}
-
-/**
- * @brief Stops the Camera capture.
- * @retval Camera status
- */
-uint8_t BSP_CAMERA_Stop(void)
-{
- DCMI_HandleTypeDef *phdcmi;
-
- uint8_t ret = CAMERA_ERROR;
-
- /* Get the DCMI handle structure */
- phdcmi = &hdcmi_eval;
-
- if(HAL_DCMI_Stop(phdcmi) == HAL_OK)
- {
- ret = CAMERA_OK;
- }
-
- return ret;
-}
-
-/**
- * @brief Configures the Camera contrast and brightness.
- * @param contrast_level: Contrast level
- * This parameter can be one of the following values:
- * @arg CAMERA_CONTRAST_LEVEL4: for contrast +2
- * @arg CAMERA_CONTRAST_LEVEL3: for contrast +1
- * @arg CAMERA_CONTRAST_LEVEL2: for contrast 0
- * @arg CAMERA_CONTRAST_LEVEL1: for contrast -1
- * @arg CAMERA_CONTRAST_LEVEL0: for contrast -2
- * @param brightness_level: Brightness level
- * This parameter can be one of the following values:
- * @arg CAMERA_BRIGHTNESS_LEVEL4: for brightness +2
- * @arg CAMERA_BRIGHTNESS_LEVEL3: for brightness +1
- * @arg CAMERA_BRIGHTNESS_LEVEL2: for brightness 0
- * @arg CAMERA_BRIGHTNESS_LEVEL1: for brightness -1
- * @arg CAMERA_BRIGHTNESS_LEVEL0: for brightness -2
- */
-void BSP_CAMERA_ContrastBrightnessConfig(uint32_t contrast_level, uint32_t brightness_level)
-{
- if(camera_drv->Config != NULL)
- {
- camera_drv->Config(CAMERA_I2C_ADDRESS, CAMERA_CONTRAST_BRIGHTNESS, contrast_level, brightness_level);
- }
-}
-
-/**
- * @brief Configures the Camera white balance.
- * @param Mode: black_white mode
- * This parameter can be one of the following values:
- * @arg CAMERA_BLACK_WHITE_BW
- * @arg CAMERA_BLACK_WHITE_NEGATIVE
- * @arg CAMERA_BLACK_WHITE_BW_NEGATIVE
- * @arg CAMERA_BLACK_WHITE_NORMAL
- */
-void BSP_CAMERA_BlackWhiteConfig(uint32_t Mode)
-{
- if(camera_drv->Config != NULL)
- {
- camera_drv->Config(CAMERA_I2C_ADDRESS, CAMERA_BLACK_WHITE, Mode, 0);
- }
-}
-
-/**
- * @brief Configures the Camera color effect.
- * @param Effect: Color effect
- * This parameter can be one of the following values:
- * @arg CAMERA_COLOR_EFFECT_ANTIQUE
- * @arg CAMERA_COLOR_EFFECT_BLUE
- * @arg CAMERA_COLOR_EFFECT_GREEN
- * @arg CAMERA_COLOR_EFFECT_RED
- */
-void BSP_CAMERA_ColorEffectConfig(uint32_t Effect)
-{
- if(camera_drv->Config != NULL)
- {
- camera_drv->Config(CAMERA_I2C_ADDRESS, CAMERA_COLOR_EFFECT, Effect, 0);
- }
-}
-
-/**
- * @brief Handles DCMI interrupt request.
- */
-void BSP_CAMERA_IRQHandler(void)
-{
- HAL_DCMI_IRQHandler(&hdcmi_eval);
-}
-
-/**
- * @brief Handles DMA interrupt request.
- */
-void BSP_CAMERA_DMA_IRQHandler(void)
-{
- HAL_DMA_IRQHandler(hdcmi_eval.DMA_Handle);
-}
-
-/**
- * @brief Get the capture size.
- * @param resolution: the current resolution.
- * @retval cpature size
- */
-static uint32_t GetSize(uint32_t resolution)
-{
- uint32_t size = 0;
-
- /* Get capture size */
- switch (resolution)
- {
- case CAMERA_R160x120:
- {
- size = 0x2580;
- }
- break;
- case CAMERA_R320x240:
- {
- size = 0x9600;
- }
- break;
- default:
- {
- break;
- }
- }
-
- return size;
-}
-
-/**
- * @brief Initializes the DCMI MSP.
- */
-__weak void BSP_CAMERA_MspInit(void)
-{
- static DMA_HandleTypeDef hdma;
- GPIO_InitTypeDef GPIO_Init_Structure;
- DCMI_HandleTypeDef *hdcmi = &hdcmi_eval;
-
- /*** Enable peripherals and GPIO clocks ***/
- /* Enable DCMI clock */
- __HAL_RCC_DCMI_CLK_ENABLE();
-
- /* Enable DMA2 clock */
- __HAL_RCC_DMA2_CLK_ENABLE();
-
- /* Enable GPIO clocks */
- __HAL_RCC_GPIOA_CLK_ENABLE();
- __HAL_RCC_GPIOH_CLK_ENABLE();
- __HAL_RCC_GPIOI_CLK_ENABLE();
-
- /*** Configure the GPIO ***/
- /* Configure DCMI GPIO as alternate function */
- GPIO_Init_Structure.Pin = GPIO_PIN_6;
- GPIO_Init_Structure.Mode = GPIO_MODE_AF_PP;
- GPIO_Init_Structure.Pull = GPIO_PULLUP;
- GPIO_Init_Structure.Speed = GPIO_SPEED_HIGH;
- GPIO_Init_Structure.Alternate = GPIO_AF13_DCMI;
- HAL_GPIO_Init(GPIOA, &GPIO_Init_Structure);
-
- GPIO_Init_Structure.Pin = GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 |\
- GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_14;
- GPIO_Init_Structure.Mode = GPIO_MODE_AF_PP;
- GPIO_Init_Structure.Pull = GPIO_PULLUP;
- GPIO_Init_Structure.Speed = GPIO_SPEED_HIGH;
- GPIO_Init_Structure.Alternate = GPIO_AF13_DCMI;
- HAL_GPIO_Init(GPIOH, &GPIO_Init_Structure);
-
- GPIO_Init_Structure.Pin = GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 |\
- GPIO_PIN_7;
- GPIO_Init_Structure.Mode = GPIO_MODE_AF_PP;
- GPIO_Init_Structure.Pull = GPIO_PULLUP;
- GPIO_Init_Structure.Speed = GPIO_SPEED_HIGH;
- GPIO_Init_Structure.Alternate = GPIO_AF13_DCMI;
- HAL_GPIO_Init(GPIOI, &GPIO_Init_Structure);
-
- /*** Configure the DMA streams ***/
- /* Configure the DMA handler for Transmission process */
- hdma.Init.Channel = DMA_CHANNEL_1;
- hdma.Init.Direction = DMA_PERIPH_TO_MEMORY;
- hdma.Init.PeriphInc = DMA_PINC_DISABLE;
- hdma.Init.MemInc = DMA_MINC_ENABLE;
- hdma.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD;
- hdma.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;
- hdma.Init.Mode = DMA_CIRCULAR;
- hdma.Init.Priority = DMA_PRIORITY_HIGH;
- hdma.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
- hdma.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL;
- hdma.Init.MemBurst = DMA_MBURST_SINGLE;
- hdma.Init.PeriphBurst = DMA_PBURST_SINGLE;
-
- hdma.Instance = DMA2_Stream1;
-
- /* Associate the initialized DMA handle to the DCMI handle */
- __HAL_LINKDMA(hdcmi, DMA_Handle, hdma);
-
- /*** Configure the NVIC for DCMI and DMA ***/
- /* NVIC configuration for DCMI transfer complete interrupt */
- HAL_NVIC_SetPriority(DCMI_IRQn, 0x0F, 0);
- HAL_NVIC_EnableIRQ(DCMI_IRQn);
-
- /* NVIC configuration for DMA2 transfer complete interrupt */
- HAL_NVIC_SetPriority(DMA2_Stream1_IRQn, 0x0F, 0);
- HAL_NVIC_EnableIRQ(DMA2_Stream1_IRQn);
-
- /* Configure the DMA stream */
- HAL_DMA_Init(hdcmi->DMA_Handle);
-}
-
-/**
- * @brief Line event callback
- * @param hdcmi: pointer to the DCMI handle
- */
-void HAL_DCMI_LineEventCallback(DCMI_HandleTypeDef *hdcmi)
-{
- BSP_CAMERA_LineEventCallback();
-}
-
-/**
- * @brief Line Event callback.
- */
-__weak void BSP_CAMERA_LineEventCallback(void)
-{
- /* NOTE : This function Should not be modified, when the callback is needed,
- the HAL_DCMI_LineEventCallback could be implemented in the user file
- */
-}
-
-/**
- * @brief VSYNC event callback
- * @param hdcmi: pointer to the DCMI handle
- */
-void HAL_DCMI_VsyncEventCallback(DCMI_HandleTypeDef *hdcmi)
-{
- BSP_CAMERA_VsyncEventCallback();
-}
-
-/**
- * @brief VSYNC Event callback.
- */
-__weak void BSP_CAMERA_VsyncEventCallback(void)
-{
- /* NOTE : This function Should not be modified, when the callback is needed,
- the HAL_DCMI_VsyncEventCallback could be implemented in the user file
- */
-}
-
-/**
- * @brief Frame event callback
- * @param hdcmi: pointer to the DCMI handle
- */
-void HAL_DCMI_FrameEventCallback(DCMI_HandleTypeDef *hdcmi)
-{
- BSP_CAMERA_FrameEventCallback();
-}
-
-/**
- * @brief Frame Event callback.
- */
-__weak void BSP_CAMERA_FrameEventCallback(void)
-{
- /* NOTE : This function Should not be modified, when the callback is needed,
- the HAL_DCMI_FrameEventCallback could be implemented in the user file
- */
-}
-
-/**
- * @brief Error callback
- * @param hdcmi: pointer to the DCMI handle
- */
-void HAL_DCMI_ErrorCallback(DCMI_HandleTypeDef *hdcmi)
-{
- BSP_CAMERA_ErrorCallback();
-}
-
-/**
- * @brief Error callback.
- */
-__weak void BSP_CAMERA_ErrorCallback(void)
-{
- /* NOTE : This function Should not be modified, when the callback is needed,
- the HAL_DCMI_ErrorCallback could be implemented in the user file
- */
-}
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
diff --git a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_camera.h b/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_camera.h
deleted file mode 100644
index 718272c7..00000000
--- a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_camera.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- ******************************************************************************
- * @file stm322xg_eval_camera.h
- * @author MCD Application Team
- * @brief This file contains all the functions prototypes for the
- * stm322xg_eval_camera.c 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 __STM322xG_EVAL_CAMERA_H
-#define __STM322xG_EVAL_CAMERA_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm322xg_eval.h"
-#include "stm322xg_eval_io.h"
-
-/* Include Camera component Driver */
-#include "../Components/ov2640/ov2640.h"
-
-/** @addtogroup BSP
- * @{
- */
-
-
-/** @addtogroup STM322xG_EVAL
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL_CAMERA
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_CAMERA_Exported_Types STM322xG EVAL CAMERA Exported Types
- * @{
- */
-
-/**
- * @brief Camera status structure definition
- */
-typedef enum
-{
- CAMERA_OK = 0x00,
- CAMERA_ERROR = 0x01,
- CAMERA_TIMEOUT = 0x02
-}Camera_StatusTypeDef;
-
-#define RESOLUTION_R160x120 CAMERA_R160x120 /* QQVGA Resolution */
-#define RESOLUTION_R320x240 CAMERA_R320x240 /* QVGA Resolution */
-
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_CAMERA_Exported_Constants STM322xG EVAL CAMERA Exported Constants
- * @{
- */
-#define CAMERA_I2C_ADDRESS 0x60
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_CAMERA_Exported_Functions STM322xG EVAL CAMERA Exported Functions
- * @{
- */
-uint8_t BSP_CAMERA_Init(uint32_t Resolution);
-void BSP_CAMERA_ContinuousStart(uint8_t *buff);
-void BSP_CAMERA_SnapshotStart(uint8_t *buff);
-void BSP_CAMERA_Suspend(void);
-void BSP_CAMERA_Resume(void);
-uint8_t BSP_CAMERA_Stop(void);
-void BSP_CAMERA_LineEventCallback(void);
-void BSP_CAMERA_VsyncEventCallback(void);
-void BSP_CAMERA_FrameEventCallback(void);
-void BSP_CAMERA_ErrorCallback(void);
-void BSP_CAMERA_MspInit(void);
-
-/* Camera features functions prototype */
-void BSP_CAMERA_ContrastBrightnessConfig(uint32_t contrast_level, uint32_t brightness_level);
-void BSP_CAMERA_BlackWhiteConfig(uint32_t Mode);
-void BSP_CAMERA_ColorEffectConfig(uint32_t Effect);
-
-/* To be called in DCMI_IRQHandler function */
-void BSP_CAMERA_IRQHandler(void);
-/* To be called in DMA2_Stream1_IRQHandler function */
-void BSP_CAMERA_DMA_IRQHandler(void);
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM322xG_EVAL_CAMERA_H */
-
diff --git a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_eeprom.c b/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_eeprom.c
deleted file mode 100644
index f7d3668b..00000000
--- a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_eeprom.c
+++ /dev/null
@@ -1,389 +0,0 @@
-/**
- ******************************************************************************
- * @file stm322xg_eval_eeprom.c
- * @author MCD Application Team
- * @brief This file provides a set of functions needed to manage an I2C M24C64
- * EEPROM memory.
- *
- * ===================================================================
- * Notes:
- * - This driver is intended for STM32F2xx families devices only.
- * - The I2C EEPROM memory (M24C64) is available on STM322xG-EVAL
- * - To use this driver you have to connect the eeprom jumper (JP24).
- * ===================================================================
- *
- * It implements a high level communication layer for read and write
- * from/to this memory. The needed STM32F2xx hardware resources (I2C and
- * GPIO) are defined in stm32f2xg_eval.h file, and the initialization is
- * performed in EEPROM_IO_Init() function declared in stm32f2xg_eval.c
- * file.
- * You can easily tailor this driver to any other development board,
- * by just adapting the defines for hardware resources and
- * EEPROM_IO_Init() function.
- *
- * @note In this driver, basic read and write functions (BSP_EEPROM_ReadBuffer()
- * and EEPROM_WritePage()) use Polling mode to perform the data transfer
- * to/from EEPROM memory.
- *
- * +-----------------------------------------------------------------+
- * | Pin assignment for M24C64 EEPROM |
- * +---------------------------------------+-----------+-------------+
- * | STM32F2xx I2C Pins | EEPROM | Pin |
- * +---------------------------------------+-----------+-------------+
- * | . | E0 | 1 (0V) |
- * | . | E1 | 2 (0V) |
- * | . | E2 | 3 (0V) |
- * | . | VSS(GND)| 4 (0V) |
- * | SDA | SDA | 5 |
- * | SCL | SCL | 6 |
- * | JP24 | /WS | 7 |
- * | . | VDD | 8 (3.3V) |
- * +---------------------------------------+-----------+-------------+
- *
- ******************************************************************************
- * @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.
- *
- ******************************************************************************
- */
-/* Includes ------------------------------------------------------------------*/
-#include "stm322xg_eval_eeprom.h"
-/** @addtogroup BSP
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL_EEPROM STM322xG EVAL EEPROM
- * @brief This file includes the I2C EEPROM driver of STM322xG-EVAL evaluation board.
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_EEPROM_Private_Variables STM322xG EVAL EEPROM Private Variables
- * @{
- */
-
-__IO uint32_t EEPROMTimeout = EEPROM_READ_TIMEOUT;
-__IO uint16_t EEPROMDataRead;
-__IO uint8_t EEPROMDataWrite;
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_EEPROM_Private_Function_Prototypes STM322xG EVAL EEPROM Private Function Prototypes
- * @{
- */
-static uint32_t EEPROM_WritePage(uint8_t* pBuffer, uint16_t WriteAddr, uint8_t* NumByteToWrite);
-static uint32_t EEPROM_WaitEepromStandbyState(void);
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_EEPROM_Private_Functions STM322xG EVAL EEPROM Private Functions
- * @{
- */
-
-/**
- * @brief Initializes peripherals used by the I2C EEPROM driver.
- * @retval EEPROM_OK (0) if operation is correctly performed, else return value
- * different from EEPROM_OK (0)
- */
-uint32_t BSP_EEPROM_Init(void)
-{
- /* I2C Initialization */
- EEPROM_IO_Init();
-
- /* Select the EEPROM address and check if OK */
- if(EEPROM_IO_IsDeviceReady(EEPROM_I2C_ADDRESS, EEPROM_MAX_TRIALS) != HAL_OK)
- {
- return EEPROM_FAIL;
- }
- return EEPROM_OK;
-}
-
-/**
- * @brief Reads a block of data from the EEPROM.
- * @param pBuffer: pointer to the buffer that receives the data read from
- * the EEPROM.
- * @param ReadAddr: EEPROM's internal address to start reading from.
- * @param NumByteToRead: pointer to the variable holding number of bytes to
- * be read from the EEPROM.
- *
- * @note The variable pointed by NumByteToRead is reset to 0 when all the
- * data are read from the EEPROM. Application should monitor this
- * variable in order know when the transfer is complete.
- *
- * @retval EEPROM_OK (0) if operation is correctly performed, else return value
- * different from EEPROM_OK (0) or the timeout user callback.
- */
-uint32_t BSP_EEPROM_ReadBuffer(uint8_t* pBuffer, uint16_t ReadAddr, uint16_t* NumByteToRead)
-{
- uint32_t buffersize = *NumByteToRead;
-
- /* Set the pointer to the Number of data to be read */
- EEPROMDataRead = *NumByteToRead;
-
- if(EEPROM_IO_ReadData(EEPROM_I2C_ADDRESS, ReadAddr, pBuffer, buffersize) != HAL_OK)
- {
- BSP_EEPROM_TIMEOUT_UserCallback();
- return EEPROM_FAIL;
- }
-
- /* If all operations OK, return EEPROM_OK (0) */
- return EEPROM_OK;
-}
-
-/**
- * @brief Writes buffer of data to the I2C EEPROM.
- * @param pBuffer: pointer to the buffer containing the data to be written
- * to the EEPROM.
- * @param WriteAddr: EEPROM's internal address to write to.
- * @param NumByteToWrite: number of bytes to write to the EEPROM.
- * @retval EEPROM_OK (0) if operation is correctly performed, else return value
- * different from EEPROM_OK (0) or the timeout user callback.
- */
-uint32_t BSP_EEPROM_WriteBuffer(uint8_t* pBuffer, uint16_t WriteAddr, uint16_t NumByteToWrite)
-{
- uint8_t numofpage = 0, numofsingle = 0, count = 0;
- uint16_t addr = 0;
- uint8_t dataindex = 0;
- uint32_t status = EEPROM_OK;
-
- addr = WriteAddr % EEPROM_PAGESIZE;
- count = EEPROM_PAGESIZE - addr;
- numofpage = NumByteToWrite / EEPROM_PAGESIZE;
- numofsingle = NumByteToWrite % EEPROM_PAGESIZE;
-
- /* If WriteAddr is EEPROM_PAGESIZE aligned */
- if(addr == 0)
- {
- /* If NumByteToWrite < EEPROM_PAGESIZE */
- if(numofpage == 0)
- {
- /* Store the number of data to be written */
- dataindex = numofsingle;
- /* Start writing data */
- status = EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex));
- if(status != EEPROM_OK)
- {
- return status;
- }
- }
- /* If NumByteToWrite > EEPROM_PAGESIZE */
- else
- {
- while(numofpage--)
- {
- /* Store the number of data to be written */
- dataindex = EEPROM_PAGESIZE;
- status = EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex));
- if(status != EEPROM_OK)
- {
- return status;
- }
-
- WriteAddr += EEPROM_PAGESIZE;
- pBuffer += EEPROM_PAGESIZE;
- }
-
- if(numofsingle!=0)
- {
- /* Store the number of data to be written */
- dataindex = numofsingle;
- status = EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex));
- if(status != EEPROM_OK)
- {
- return status;
- }
- }
- }
- }
- /* If WriteAddr is not EEPROM_PAGESIZE aligned */
- else
- {
- /* If NumByteToWrite < EEPROM_PAGESIZE */
- if(numofpage == 0)
- {
- /* If the number of data to be written is more than the remaining space
- in the current page: */
- if(NumByteToWrite > count)
- {
- /* Store the number of data to be written */
- dataindex = count;
- /* Write the data contained in same page */
- status = EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex));
- if(status != EEPROM_OK)
- {
- return status;
- }
-
- /* Store the number of data to be written */
- dataindex = (NumByteToWrite - count);
- /* Write the remaining data in the following page */
- status = EEPROM_WritePage((uint8_t*)(pBuffer + count), (WriteAddr + count), (uint8_t*)(&dataindex));
- if(status != EEPROM_OK)
- {
- return status;
- }
- }
- else
- {
- /* Store the number of data to be written */
- dataindex = numofsingle;
- status = EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex));
- if(status != EEPROM_OK)
- {
- return status;
- }
- }
- }
- /* If NumByteToWrite > EEPROM_PAGESIZE */
- else
- {
- NumByteToWrite -= count;
- numofpage = NumByteToWrite / EEPROM_PAGESIZE;
- numofsingle = NumByteToWrite % EEPROM_PAGESIZE;
-
- if(count != 0)
- {
- /* Store the number of data to be written */
- dataindex = count;
- status = EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex));
- if(status != EEPROM_OK)
- {
- return status;
- }
- WriteAddr += count;
- pBuffer += count;
- }
-
- while(numofpage--)
- {
- /* Store the number of data to be written */
- dataindex = EEPROM_PAGESIZE;
- status = EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex));
- if(status != EEPROM_OK)
- {
- return status;
- }
- WriteAddr += EEPROM_PAGESIZE;
- pBuffer += EEPROM_PAGESIZE;
- }
- if(numofsingle != 0)
- {
- /* Store the number of data to be written */
- dataindex = numofsingle;
- status = EEPROM_WritePage(pBuffer, WriteAddr, (uint8_t*)(&dataindex));
- if(status != EEPROM_OK)
- {
- return status;
- }
- }
- }
- }
-
- /* If all operations OK, return EEPROM_OK (0) */
- return EEPROM_OK;
-}
-
-/**
- * @brief Writes more than one byte to the EEPROM with a single WRITE cycle.
- *
- * @note The number of bytes (combined to write start address) must not
- * cross the EEPROM page boundary. This function can only write into
- * the boundaries of an EEPROM page.
- * This function doesn't check on boundaries condition (in this driver
- * the function BSP_EEPROM_WriteBuffer() which calls EEPROM_WritePage() is
- * responsible of checking on Page boundaries).
- *
- * @param pBuffer: pointer to the buffer containing the data to be written to
- * the EEPROM.
- * @param WriteAddr: EEPROM's internal address to write to.
- * @param NumByteToWrite: pointer to the variable holding number of bytes to
- * be written into the EEPROM.
- *
- * @note The variable pointed by NumByteToWrite is reset to 0 when all the
- * data are written to the EEPROM. Application should monitor this
- * variable in order know when the transfer is complete.
- *
- * @retval EEPROM_OK (0) if operation is correctly performed, else return value
- * different from EEPROM_OK (0) or the timeout user callback.
- */
-static uint32_t EEPROM_WritePage(uint8_t* pBuffer, uint16_t WriteAddr, uint8_t* NumByteToWrite)
-{
- uint32_t buffersize = *NumByteToWrite;
- uint32_t status = EEPROM_OK;
-
- /* Set the pointer to the Number of data to be written */
- EEPROMDataWrite = *NumByteToWrite;
- if(EEPROM_IO_WriteData(EEPROM_I2C_ADDRESS, WriteAddr, pBuffer, buffersize) != HAL_OK)
- {
- BSP_EEPROM_TIMEOUT_UserCallback();
- status = EEPROM_FAIL;
- }
-
- while(EEPROM_WaitEepromStandbyState() != EEPROM_OK)
- {
- return EEPROM_FAIL;
- }
-
- /* If all operations OK, return EEPROM_OK (0) */
- return status;
-}
-
-/**
- * @brief Waits for EEPROM Standby state.
- *
- * @note This function allows to wait and check that EEPROM has finished the
- * last operation. It is mostly used after Write operation: after receiving
- * the buffer to be written, the EEPROM may need additional time to actually
- * perform the write operation. During this time, it doesn't answer to
- * I2C packets addressed to it. Once the write operation is complete
- * the EEPROM responds to its address.
- *
- * @retval EEPROM_OK (0) if operation is correctly performed, else return value
- * different from EEPROM_OK (0) or the timeout user callback.
- */
-static uint32_t EEPROM_WaitEepromStandbyState(void)
-{
- /* Check if the maximum allowed number of trials has bee reached */
- if(EEPROM_IO_IsDeviceReady(EEPROM_I2C_ADDRESS, EEPROM_MAX_TRIALS) != HAL_OK)
- {
- /* If the maximum number of trials has been reached, exit the function */
- BSP_EEPROM_TIMEOUT_UserCallback();
- return EEPROM_TIMEOUT;
- }
- return EEPROM_OK;
-}
-
-/**
- * @brief Basic management of the timeout situation.
- */
-__weak void BSP_EEPROM_TIMEOUT_UserCallback(void)
-{
-}
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
diff --git a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_eeprom.h b/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_eeprom.h
deleted file mode 100644
index afe574c5..00000000
--- a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_eeprom.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- ******************************************************************************
- * @file stm322xg_eval_eeprom.h
- * @author MCD Application Team
- * @brief This file contains all the functions prototypes for
- * the stm322xg_eval_eeprom.c firmware 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 __STM322xG_EVAL_EEPROM_H
-#define __STM322xG_EVAL_EEPROM_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm322xg_eval.h"
-
-/** @addtogroup BSP
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL_EEPROM
- * @brief This file includes the I2C EEPROM driver of STM322xG-EVAL evaluation board.
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_EEPROM_Exported_Constants STM322xG EVAL EEPROM Exported Constants
- * @{
- */
-/* EEPROM hardware address and page size */
-#define EEPROM_PAGESIZE 32
-#define EEPROM_MAX_SIZE 0x2000 /* 64Kbit*/
-/* Maximum Timeout values for flags and events waiting loops: This timeout is based
- on systick set to 1ms.
- Timeout for read based if read all the EEPROM: EEPROM_MAX_SIZE * BSP_I2C_SPEED (640ms) */
-#define EEPROM_READ_TIMEOUT ((uint32_t)(1000))
-/* Timeout for write based on max write which is EEPROM_PAGESIZE bytes: EEPROM_PAGESIZE * BSP_I2C_SPEED (320us)*/
-#define EEPROM_WRITE_TIMEOUT ((uint32_t)(1000))
-
-/* Maximum number of trials for EEPROM_WaitEepromStandbyState() function */
-#define EEPROM_MAX_TRIALS 3000
-
-#define EEPROM_OK 0
-#define EEPROM_FAIL 1
-#define EEPROM_TIMEOUT 2
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_EEPROM_Exported_Functions STM322xG EVAL EEPROM Exported Functions
- * @{
- */
-uint32_t BSP_EEPROM_Init(void);
-uint32_t BSP_EEPROM_ReadBuffer(uint8_t *pBuffer, uint16_t ReadAddr, uint16_t *NumByteToRead);
-uint32_t BSP_EEPROM_WriteBuffer(uint8_t *pBuffer, uint16_t WriteAddr, uint16_t NumByteToWrite);
-
-/* USER Callbacks: This function is declared as __weak in EEPROM driver and
- should be implemented into user application.
- BSP_EEPROM_TIMEOUT_UserCallback() function is called whenever a timeout condition
- occurs during communication (waiting on an event that doesn't occur, bus
- errors, busy devices ...). */
-void BSP_EEPROM_TIMEOUT_UserCallback(void);
-
-/* Link function for I2C EEPROM peripheral */
-void EEPROM_IO_Init(void);
-HAL_StatusTypeDef EEPROM_IO_WriteData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize);
-HAL_StatusTypeDef EEPROM_IO_ReadData(uint16_t DevAddress, uint16_t MemAddress, uint8_t* pBuffer, uint32_t BufferSize);
-HAL_StatusTypeDef EEPROM_IO_IsDeviceReady(uint16_t DevAddress, uint32_t Trials);
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM322xG_EVAL_EEPROM_H */
-
diff --git a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_io.c b/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_io.c
deleted file mode 100644
index ad466907..00000000
--- a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_io.c
+++ /dev/null
@@ -1,215 +0,0 @@
-/**
- ******************************************************************************
- * @file stm322xg_eval_io.c
- * @author MCD Application Team
- * @brief This file provides a set of functions needed to manage the IO pins
- * on STM322xG-EVAL evaluation board.
- ******************************************************************************
- * @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.
- *
- ******************************************************************************
- */
-
-/* File Info : -----------------------------------------------------------------
- User NOTES
-1. How To use this driver:
---------------------------
- - This driver is used to drive the IO module of the STM322xG-EVAL evaluation
- board.
- - The STMPE811 IO expander device component driver must be included with this
- driver in order to run the IO functionalities commanded by the IO expander
- device mounted on the evaluation board.
-
-2. Driver description:
----------------------
- + Initialization steps:
- o Initialize the IO module using the BSP_IO_Init() function. This
- function includes the MSP layer hardware resources initialization and the
- communication layer configuration to start the IO functionalities use.
-
- + IO functionalities use
- o The IO pin mode is configured when calling the function BSP_IO_ConfigPin(), you
- must specify the desired IO mode by choosing the "IO_ModeTypedef" parameter
- predefined value.
- o If an IO pin is used in interrupt mode, the function BSP_IO_ITGetStatus() is
- needed to get the interrupt status. To clear the IT pending bits, you should
- call the function BSP_IO_ITClear() with specifying the IO pending bit to clear.
- o The IT is handled using the corresponding external interrupt IRQ handler,
- the user IT callback treatment is implemented on the same external interrupt
- callback.
- o To get/set an IO pin combination state you can use the functions
- BSP_IO_ReadPin()/BSP_IO_WritePin() or the function BSP_IO_TogglePin() to toggle the pin
- state.
-
-------------------------------------------------------------------------------*/
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm322xg_eval_io.h"
-
-/** @addtogroup BSP
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_IO STM322xG EVAL IO
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_IO_Private_Types_Definitions STM322xG EVAL IO Private Types Definitions
- * @{
- */
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_IO_Private_Variables STM322xG EVAL IO Private Variables
- * @{
- */
-static IO_DrvTypeDef *io_driver;
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_IO_Private_Functions STM3222xG EVAL IO Private Functions
- * @{
- */
-
-/**
- * @brief Initializes and configures the IO functionalities and configures all
- * necessary hardware resources (GPIOs, clocks..).
- * @note BSP_IO_Init() is using HAL_Delay() function to ensure that stmpe811
- * IO Expander is correctly reset. HAL_Delay() function provides accurate
- * delay (in milliseconds) based on variable incremented in SysTick ISR.
- * This implies that if BSP_IO_Init() is called from a peripheral ISR process,
- * then the SysTick interrupt must have higher priority (numerically lower)
- * than the peripheral interrupt. Otherwise the caller ISR process will be blocked.
- * @retval IO_OK: if all initializations are OK. Other value if error.
- */
-uint8_t BSP_IO_Init(void)
-{
- uint8_t ret = IO_ERROR;
-
- if(stmpe811_io_drv.ReadID(IO_I2C_ADDRESS) == STMPE811_ID)
- {
- /* Initialize the IO driver structure */
- io_driver = &stmpe811_io_drv;
-
- io_driver->Init(IO_I2C_ADDRESS);
- io_driver->Start(IO_I2C_ADDRESS, IO_PIN_ALL);
-
- ret = IO_OK;
- }
-
- return ret;
-}
-
-/**
- * @brief Gets the selected pins IT status.
- * @param IO_Pin: Selected pins to check the status.
- * This parameter can be any combination of the IO pins.
- * @retval IO_OK: if read status OK. Other value if error.
- */
-uint8_t BSP_IO_ITGetStatus(uint16_t IO_Pin)
-{
- /* Return the IO Pin IT status */
- return (io_driver->ITStatus(IO_I2C_ADDRESS, IO_Pin));
-}
-
-/**
- * @brief Clears the selected IO IT pending bit.
- * @param IO_Pin: Selected pins to check the status.
- * This parameter can be any combination of the IO pins.
- */
-void BSP_IO_ITClear(uint16_t IO_Pin)
-{
- io_driver->ClearIT(IO_I2C_ADDRESS, IO_Pin);
-}
-
-/**
- * @brief Configures the IO pin(s) according to IO mode structure value.
- * @param IO_Pin: Output pin to be set or reset.
- * This parameter can be one of the following values:
- * @arg STMPE811_PIN_x: where x can be from 0 to 7
- * @param IO_Mode: IO pin mode to configure
- * This parameter can be one of the following values:
- * @arg IO_MODE_INPUT
- * @arg IO_MODE_OUTPUT
- * @arg IO_MODE_IT_RISING_EDGE
- * @arg IO_MODE_IT_FALLING_EDGE
- * @arg IO_MODE_IT_LOW_LEVEL
- * @arg IO_MODE_IT_HIGH_LEVEL
- * @retval IO_OK: if all initializations are OK. Other value if error.
- */
-uint8_t BSP_IO_ConfigPin(uint16_t IO_Pin, IO_ModeTypedef IO_Mode)
-{
- /* Configure the selected IO pin(s) mode */
- io_driver->Config(IO_I2C_ADDRESS, IO_Pin, IO_Mode);
-
- return IO_OK;
-}
-
-/**
- * @brief Sets the selected pins state.
- * @param IO_Pin: Selected pins to write.
- * This parameter can be any combination of the IO pins.
- * @param PinState: New pins state to write
- */
-void BSP_IO_WritePin(uint16_t IO_Pin, uint8_t PinState)
-{
- io_driver->WritePin(IO_I2C_ADDRESS, IO_Pin, PinState);
-}
-
-/**
- * @brief Gets the selected pins current state.
- * @param IO_Pin: Selected pins to read.
- * This parameter can be any combination of the IO pins.
- * @retval The current pins state
- */
-uint16_t BSP_IO_ReadPin(uint16_t IO_Pin)
-{
- return(io_driver->ReadPin(IO_I2C_ADDRESS, IO_Pin));
-}
-
-/**
- * @brief Toggles the selected pins state
- * @param IO_Pin: Selected pins to toggle.
- * This parameter can be any combination of the IO pins.
- */
-void BSP_IO_TogglePin(uint16_t IO_Pin)
-{
- if(io_driver->ReadPin(IO_I2C_ADDRESS, IO_Pin) == 1) /* Set */
- {
- io_driver->WritePin(IO_I2C_ADDRESS, IO_Pin, 0); /* Reset */
- }
- else
- {
- io_driver->WritePin(IO_I2C_ADDRESS, IO_Pin, 1); /* Set */
- }
-}
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
diff --git a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_io.h b/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_io.h
deleted file mode 100644
index c5edb6b4..00000000
--- a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_io.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- ******************************************************************************
- * @file stm322xg_eval_io.h
- * @author MCD Application Team
- * @brief This file contains the common defines and functions prototypes for
- * the stm322xg_eval_io.c 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 __STM322xG_EVAL_IO_H
-#define __STM322xG_EVAL_IO_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm322xg_eval.h"
-/* Include IO component driver */
-#include "../Components/stmpe811/stmpe811.h"
-
-/** @addtogroup BSP
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_IO STM322xG EVAL IO
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_IO_Exported_Types STM322xG EVAL IO Exported Types
- * @{
- */
-typedef enum
-{
- IO_OK = 0x00,
- IO_ERROR = 0x01,
- IO_TIMEOUT = 0x02
-}IO_StatusTypeDef;
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_IO_Exported_Constants STM322xG EVAL IO Exported Constants
- * @{
- */
-#define IO_PIN_0 0x01
-#define IO_PIN_1 0x02
-#define IO_PIN_2 0x04
-#define IO_PIN_3 0x08
-#define IO_PIN_4 0x10
-#define IO_PIN_5 0x20
-#define IO_PIN_6 0x40
-#define IO_PIN_7 0x80
-#define IO_PIN_ALL 0xFF
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_IO_Exported_Functions STM322xG EVAL IO Exported Functions
- * @{
- */
-uint8_t BSP_IO_Init(void);
-void BSP_IO_ITClear(uint16_t IO_Pin);
-uint8_t BSP_IO_ITGetStatus(uint16_t IO_Pin);
-uint8_t BSP_IO_ConfigPin(uint16_t IO_Pin, IO_ModeTypedef IO_Mode);
-void BSP_IO_WritePin(uint16_t IO_Pin, uint8_t PinState);
-uint16_t BSP_IO_ReadPin(uint16_t IO_Pin);
-void BSP_IO_TogglePin(uint16_t IO_Pin);
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM322xG_EVAL_IO_H */
-
diff --git a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_lcd.c b/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_lcd.c
deleted file mode 100644
index 3e8402fd..00000000
--- a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_lcd.c
+++ /dev/null
@@ -1,1002 +0,0 @@
-/**
- ******************************************************************************
- * @file stm322xg_eval_lcd.c
- * @author MCD Application Team
- * @brief This file includes the driver for Liquid Crystal Display (LCD) module
- * mounted on STM322xG-EVAL evaluation board.
- ******************************************************************************
- * @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.
- *
- ******************************************************************************
- */
-
-/* File Info : -----------------------------------------------------------------
- User NOTES
-1. How To use this driver:
---------------------------
- - This driver is used to drive indirectly an LCD TFT.
- - This driver supports the ILI9325 LCD mounted on MB785 daughter board
- - The ILI9325 component driver MUST be included with this driver.
-
-2. Driver description:
----------------------
- + Initialization steps:
- o Initialize the LCD using the BSP_LCD_Init() function.
-
- + Display on LCD
- o Clear the hole LCD using the BSP_LCD_Clear() function or only one specified
- string line using the BSP_LCD_ClearStringLine() function.
- o Display a character on the specified line and column using the BSP_LCD_DisplayChar()
- function or a complete string line using the BSP_LCD_DisplayStringAtLine() function.
- o Display a string line on the specified position (x,y in pixel) and align mode
- using the BSP_LCD_DisplayStringAtLine() function.
- o Draw and fill basic shapes (dot, line, rectangle, circle, ellipse, .. bitmap, raw picture)
- on LCD using a set of functions.
-
-------------------------------------------------------------------------------*/
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm322xg_eval_lcd.h"
-#include "../../../Utilities/Fonts/fonts.h"
-#include "../../../Utilities/Fonts/font24.c"
-#include "../../../Utilities/Fonts/font20.c"
-#include "../../../Utilities/Fonts/font16.c"
-#include "../../../Utilities/Fonts/font12.c"
-#include "../../../Utilities/Fonts/font8.c"
-
-/** @addtogroup BSP
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_LCD STM322xG EVAL LCD
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_LCD_Private_Defines STM322xG EVAL LCD Private Defines
- * @{
- */
-#define POLY_X(Z) ((int32_t)((Points + (Z))->X))
-#define POLY_Y(Z) ((int32_t)((Points + (Z))->Y))
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_LCD_Private_Macros STM322xG EVAL LCD Private Macros
- * @{
- */
-#define ABS(X) ((X) > 0 ? (X) : -(X))
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_LCD_Private_Variables STM322xG EVAL LCD Private Variables
- * @{
- */
-LCD_DrawPropTypeDef DrawProp;
-static LCD_DrvTypeDef *lcd_drv;
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_LCD_Private_FunctionPrototypes STM322xG EVAL LCD Private FunctionPrototypes
- * @{
- */
-static void DrawChar(uint16_t Xpos, uint16_t Ypos, const uint8_t *c);
-static void SetDisplayWindow(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
-static void FillTriangle(uint16_t x1, uint16_t x2, uint16_t x3, uint16_t y1, uint16_t y2, uint16_t y3);
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_LCD_Private_Functions STM322xG EVAL LCD Private Functions
- * @{
- */
-
-/**
- * @brief Initializes the LCD.
- * @retval LCD state
- */
-uint8_t BSP_LCD_Init(void)
-{
- uint8_t ret = LCD_ERROR;
-
- /* Default value for draw propriety */
- DrawProp.BackColor = 0xFFFF;
- DrawProp.pFont = &Font24;
- DrawProp.TextColor = 0x0000;
-
- if(ili9325_drv.ReadID() == ILI9325_ID)
- {
- lcd_drv = &ili9325_drv;
-
- /* LCD Init */
- lcd_drv->Init();
-
- /* Initialize the font */
- BSP_LCD_SetFont(&LCD_DEFAULT_FONT);
-
- ret = LCD_OK;
- }
-
- return ret;
-}
-
-/**
- * @brief Gets the LCD X size.
- * @retval Used LCD X size
- */
-uint32_t BSP_LCD_GetXSize(void)
-{
- return(lcd_drv->GetLcdPixelWidth());
-}
-
-/**
- * @brief Gets the LCD Y size.
- * @retval Used LCD Y size
- */
-uint32_t BSP_LCD_GetYSize(void)
-{
- return(lcd_drv->GetLcdPixelHeight());
-}
-
-/**
- * @brief Gets the LCD text color.
- * @retval Used text color.
- */
-uint16_t BSP_LCD_GetTextColor(void)
-{
- return DrawProp.TextColor;
-}
-
-/**
- * @brief Gets the LCD background color.
- * @retval Used background color
- */
-uint16_t BSP_LCD_GetBackColor(void)
-{
- return DrawProp.BackColor;
-}
-
-/**
- * @brief Sets the LCD text color.
- * @param Color: Text color code RGB(5-6-5)
- */
-void BSP_LCD_SetTextColor(uint16_t Color)
-{
- DrawProp.TextColor = Color;
-}
-
-/**
- * @brief Sets the LCD background color.
- * @param Color: Background color code RGB(5-6-5)
- */
-void BSP_LCD_SetBackColor(uint16_t Color)
-{
- DrawProp.BackColor = Color;
-}
-
-/**
- * @brief Sets the LCD text font.
- * @param fonts: Font to be used
- */
-void BSP_LCD_SetFont(sFONT *fonts)
-{
- DrawProp.pFont = fonts;
-}
-
-/**
- * @brief Gets the LCD text font.
- * @retval Used font
- */
-sFONT *BSP_LCD_GetFont(void)
-{
- return DrawProp.pFont;
-}
-
-/**
- * @brief Clears the hole LCD.
- * @param Color: Color of the background
- */
-void BSP_LCD_Clear(uint16_t Color)
-{
- uint32_t counter = 0;
- uint32_t color_backup = DrawProp.TextColor;
- DrawProp.TextColor = Color;
-
- for(counter = 0; counter < BSP_LCD_GetYSize(); counter++)
- {
- BSP_LCD_DrawHLine(0, counter, BSP_LCD_GetXSize());
- }
- DrawProp.TextColor = color_backup;
- BSP_LCD_SetTextColor(DrawProp.TextColor);
-}
-
-/**
- * @brief Clears the selected line.
- * @param Line: Line to be cleared
- * This parameter can be one of the following values:
- * @arg 0..9: if the Current fonts is Font16x24
- * @arg 0..19: if the Current fonts is Font12x12 or Font8x12
- * @arg 0..29: if the Current fonts is Font8x8
- */
-void BSP_LCD_ClearStringLine(uint16_t Line)
-{
- uint32_t color_backup = DrawProp.TextColor;
- DrawProp.TextColor = DrawProp.BackColor;;
-
- /* Draw a rectangle with background color */
- BSP_LCD_FillRect(0, (Line * DrawProp.pFont->Height), BSP_LCD_GetXSize(), DrawProp.pFont->Height);
-
- DrawProp.TextColor = color_backup;
- BSP_LCD_SetTextColor(DrawProp.TextColor);
-}
-
-/**
- * @brief Displays one character.
- * @param Xpos: Start column address
- * @param Ypos: Line where to display the character shape.
- * @param Ascii: Character ascii code
- * This parameter must be a number between Min_Data = 0x20 and Max_Data = 0x7E
- */
-void BSP_LCD_DisplayChar(uint16_t Xpos, uint16_t Ypos, uint8_t Ascii)
-{
- DrawChar(Xpos, Ypos, &DrawProp.pFont->table[(Ascii-' ') *\
- DrawProp.pFont->Height * ((DrawProp.pFont->Width + 7) / 8)]);
-}
-
-/**
- * @brief Displays characters on the LCD.
- * @param Xpos: X position (in pixel)
- * @param Ypos: Y position (in pixel)
- * @param Text: Pointer to string to display on LCD
- * @param Mode: Display mode
- * This parameter can be one of the following values:
- * @arg CENTER_MODE
- * @arg RIGHT_MODE
- * @arg LEFT_MODE
- */
-void BSP_LCD_DisplayStringAt(uint16_t Xpos, uint16_t Ypos, uint8_t *Text, Line_ModeTypdef Mode)
-{
- uint16_t refcolumn = 1, i = 0;
- uint32_t size = 0, xsize = 0;
- uint8_t *ptr = Text;
-
- /* Get the text size */
- while (*ptr++) size ++ ;
-
- /* Characters number per line */
- xsize = (BSP_LCD_GetXSize()/DrawProp.pFont->Width);
-
- switch (Mode)
- {
- case CENTER_MODE:
- {
- refcolumn = Xpos + ((xsize - size)* DrawProp.pFont->Width) / 2;
- break;
- }
- case LEFT_MODE:
- {
- refcolumn = Xpos;
- break;
- }
- case RIGHT_MODE:
- {
- refcolumn = - Xpos + ((xsize - size)*DrawProp.pFont->Width);
- break;
- }
- default:
- {
- refcolumn = Xpos;
- break;
- }
- }
-
- /* Send the string character by character on lCD */
- while ((*Text != 0) & (((BSP_LCD_GetXSize() - (i*DrawProp.pFont->Width)) & 0xFFFF) >= DrawProp.pFont->Width))
- {
- /* Display one character on LCD */
- BSP_LCD_DisplayChar(refcolumn, Ypos, *Text);
- /* Decrement the column position by 16 */
- refcolumn += DrawProp.pFont->Width;
- /* Point on the next character */
- Text++;
- i++;
- }
-}
-
-/**
- * @brief Displays a character on the LCD.
- * @param Line: Line where to display the character shape
- * This parameter can be one of the following values:
- * @arg 0..9: if the Current fonts is Font16x24
- * @arg 0..19: if the Current fonts is Font12x12 or Font8x12
- * @arg 0..29: if the Current fonts is Font8x8
- * @param ptr: Pointer to string to display on LCD
- */
-void BSP_LCD_DisplayStringAtLine(uint16_t Line, uint8_t *ptr)
-{
- BSP_LCD_DisplayStringAt(0, LINE(Line), ptr, LEFT_MODE);
-}
-
-/**
- * @brief Reads an LCD pixel.
- * @param Xpos: X position
- * @param Ypos: Y position
- * @retval RGB pixel color
- */
-uint16_t BSP_LCD_ReadPixel(uint16_t Xpos, uint16_t Ypos)
-{
- uint16_t ret = 0;
-
- if(lcd_drv->ReadPixel != NULL)
- {
- ret = lcd_drv->ReadPixel(Xpos, Ypos);
- }
-
- return ret;
-}
-
-/**
- * @brief Draws a pixel on LCD.
- * @param Xpos: X position
- * @param Ypos: Y position
- * @param RGB_Code: Pixel color in RGB mode (5-6-5)
- */
-void BSP_LCD_DrawPixel(uint16_t Xpos, uint16_t Ypos, uint16_t RGB_Code)
-{
- if(lcd_drv->WritePixel != NULL)
- {
- lcd_drv->WritePixel(Xpos, Ypos, RGB_Code);
- }
-}
-
-/**
- * @brief Draws an horizontal line.
- * @param Xpos: X position
- * @param Ypos: Y position
- * @param Length: Line length
- */
-void BSP_LCD_DrawHLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length)
-{
- uint32_t index = 0;
-
- if(lcd_drv->DrawHLine != NULL)
- {
- lcd_drv->DrawHLine(DrawProp.TextColor, Xpos, Ypos, Length);
- }
- else
- {
- for(index = 0; index < Length; index++)
- {
- BSP_LCD_DrawPixel((Xpos + index), Ypos, DrawProp.TextColor);
- }
- }
-}
-
-/**
- * @brief Draws a vertical line.
- * @param Xpos: X position
- * @param Ypos: Y position
- * @param Length: Line length
- */
-void BSP_LCD_DrawVLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length)
-{
- uint32_t index = 0;
-
- if(lcd_drv->DrawVLine != NULL)
- {
- lcd_drv->DrawVLine(DrawProp.TextColor, Xpos, Ypos, Length);
- }
- else
- {
- for(index = 0; index < Length; index++)
- {
- BSP_LCD_DrawPixel(Xpos, Ypos + index, DrawProp.TextColor);
- }
- }
-}
-
-/**
- * @brief Draws an uni-line (between two points).
- * @param x1: Point 1 X position
- * @param y1: Point 1 Y position
- * @param x2: Point 2 X position
- * @param y2: Point 2 Y position
- */
-void BSP_LCD_DrawLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
-{
- int16_t deltax = 0, deltay = 0, x = 0, y = 0, xinc1 = 0, xinc2 = 0,
- yinc1 = 0, yinc2 = 0, den = 0, num = 0, numadd = 0, numpixels = 0,
- curpixel = 0;
-
- deltax = ABS(x2 - x1); /* The difference between the x's */
- deltay = ABS(y2 - y1); /* The difference between the y's */
- x = x1; /* Start x off at the first pixel */
- y = y1; /* Start y off at the first pixel */
-
- if (x2 >= x1) /* The x-values are increasing */
- {
- xinc1 = 1;
- xinc2 = 1;
- }
- else /* The x-values are decreasing */
- {
- xinc1 = -1;
- xinc2 = -1;
- }
-
- if (y2 >= y1) /* The y-values are increasing */
- {
- yinc1 = 1;
- yinc2 = 1;
- }
- else /* The y-values are decreasing */
- {
- yinc1 = -1;
- yinc2 = -1;
- }
-
- if (deltax >= deltay) /* There is at least one x-value for every y-value */
- {
- xinc1 = 0; /* Don't change the x when numerator >= denominator */
- yinc2 = 0; /* Don't change the y for every iteration */
- den = deltax;
- num = deltax / 2;
- numadd = deltay;
- numpixels = deltax; /* There are more x-values than y-values */
- }
- else /* There is at least one y-value for every x-value */
- {
- xinc2 = 0; /* Don't change the x for every iteration */
- yinc1 = 0; /* Don't change the y when numerator >= denominator */
- den = deltay;
- num = deltay / 2;
- numadd = deltax;
- numpixels = deltay; /* There are more y-values than x-values */
- }
-
- for (curpixel = 0; curpixel <= numpixels; curpixel++)
- {
- BSP_LCD_DrawPixel(x, y, DrawProp.TextColor); /* Draw the current pixel */
- num += numadd; /* Increase the numerator by the top of the fraction */
- if (num >= den) /* Check if numerator >= denominator */
- {
- num -= den; /* Calculate the new numerator value */
- x += xinc1; /* Change the x as appropriate */
- y += yinc1; /* Change the y as appropriate */
- }
- x += xinc2; /* Change the x as appropriate */
- y += yinc2; /* Change the y as appropriate */
- }
-}
-
-/**
- * @brief Draws a rectangle.
- * @param Xpos: X position
- * @param Ypos: Y position
- * @param Width: Rectangle width
- * @param Height: Rectangle height
- */
-void BSP_LCD_DrawRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height)
-{
- /* Draw horizontal lines */
- BSP_LCD_DrawHLine(Xpos, Ypos, Width);
- BSP_LCD_DrawHLine(Xpos, (Ypos+ Height), Width);
-
- /* Draw vertical lines */
- BSP_LCD_DrawVLine(Xpos, Ypos, Height);
- BSP_LCD_DrawVLine((Xpos + Width), Ypos, Height);
-}
-
-/**
- * @brief Draws a circle.
- * @param Xpos: X position
- * @param Ypos: Y position
- * @param Radius: Circle radius
- */
-void BSP_LCD_DrawCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius)
-{
- int32_t D; /* Decision Variable */
- uint32_t CurX; /* Current X Value */
- uint32_t CurY; /* Current Y Value */
-
- D = 3 - (Radius << 1);
- CurX = 0;
- CurY = Radius;
-
- while (CurX <= CurY)
- {
- BSP_LCD_DrawPixel((Xpos + CurX), (Ypos - CurY), DrawProp.TextColor);
-
- BSP_LCD_DrawPixel((Xpos - CurX), (Ypos - CurY), DrawProp.TextColor);
-
- BSP_LCD_DrawPixel((Xpos + CurY), (Ypos - CurX), DrawProp.TextColor);
-
- BSP_LCD_DrawPixel((Xpos - CurY), (Ypos - CurX), DrawProp.TextColor);
-
- BSP_LCD_DrawPixel((Xpos + CurX), (Ypos + CurY), DrawProp.TextColor);
-
- BSP_LCD_DrawPixel((Xpos - CurX), (Ypos + CurY), DrawProp.TextColor);
-
- BSP_LCD_DrawPixel((Xpos + CurY), (Ypos + CurX), DrawProp.TextColor);
-
- BSP_LCD_DrawPixel((Xpos - CurY), (Ypos + CurX), DrawProp.TextColor);
-
- /* Initialize the font */
- BSP_LCD_SetFont(&LCD_DEFAULT_FONT);
-
- if (D < 0)
- {
- D += (CurX << 2) + 6;
- }
- else
- {
- D += ((CurX - CurY) << 2) + 10;
- CurY--;
- }
- CurX++;
- }
-}
-
-/**
- * @brief Draws an poly-line (between many points).
- * @param Points: Pointer to the points array
- * @param PointCount: Number of points
- */
-void BSP_LCD_DrawPolygon(pPoint Points, uint16_t PointCount)
-{
- int16_t X = 0, Y = 0;
-
- if(PointCount < 2)
- {
- return;
- }
-
- BSP_LCD_DrawLine(Points->X, Points->Y, (Points+PointCount-1)->X, (Points+PointCount-1)->Y);
-
- while(--PointCount)
- {
- X = Points->X;
- Y = Points->Y;
- Points++;
- BSP_LCD_DrawLine(X, Y, Points->X, Points->Y);
- }
-
-}
-
-/**
- * @brief Draws an ellipse on LCD.
- * @param Xpos: X position
- * @param Ypos: Y position
- * @param XRadius: Ellipse X radius
- * @param YRadius: Ellipse Y radius
- */
-void BSP_LCD_DrawEllipse(int Xpos, int Ypos, int XRadius, int YRadius)
-{
- int x = 0, y = -YRadius, err = 2-2*XRadius, e2;
- float K = 0, rad1 = 0, rad2 = 0;
-
- rad1 = XRadius;
- rad2 = YRadius;
-
- K = (float)(rad2/rad1);
-
- do {
- BSP_LCD_DrawPixel((Xpos-(uint16_t)(x/K)), (Ypos+y), DrawProp.TextColor);
- BSP_LCD_DrawPixel((Xpos+(uint16_t)(x/K)), (Ypos+y), DrawProp.TextColor);
- BSP_LCD_DrawPixel((Xpos+(uint16_t)(x/K)), (Ypos-y), DrawProp.TextColor);
- BSP_LCD_DrawPixel((Xpos-(uint16_t)(x/K)), (Ypos-y), DrawProp.TextColor);
-
- e2 = err;
- if (e2 <= x) {
- err += ++x*2+1;
- if (-y == x && e2 <= y) e2 = 0;
- }
- if (e2 > y) err += ++y*2+1;
- }
- while (y <= 0);
-}
-
-/**
- * @brief Draws a bitmap picture (16 bpp).
- * @param Xpos: Bmp X position in the LCD
- * @param Ypos: Bmp Y position in the LCD
- * @param pbmp: Pointer to Bmp picture address.
- */
-void BSP_LCD_DrawBitmap(uint16_t Xpos, uint16_t Ypos, uint8_t *pbmp)
-{
- uint32_t height = 0;
- uint32_t width = 0;
-
- /* Read bitmap width */
- width = pbmp[18] + (pbmp[19] << 8) + (pbmp[20] << 16) + (pbmp[21] << 24);
-
- /* Read bitmap height */
- height = pbmp[22] + (pbmp[23] << 8) + (pbmp[24] << 16) + (pbmp[25] << 24);
-
- SetDisplayWindow(Xpos, Ypos, width, height);
-
- if(lcd_drv->DrawBitmap != NULL)
- {
- lcd_drv->DrawBitmap(Xpos, Ypos, pbmp);
- }
- SetDisplayWindow(0, 0, BSP_LCD_GetXSize(), BSP_LCD_GetYSize());
-}
-
-/**
- * @brief Draws RGB Image (16 bpp).
- * @param Xpos: X position in the LCD
- * @param Ypos: Y position in the LCD
- * @param Xsize: X size in the LCD
- * @param Ysize: Y size in the LCD
- * @param pdata: Pointer to the RGB Image address.
- */
-void BSP_LCD_DrawRGBImage(uint16_t Xpos, uint16_t Ypos, uint16_t Xsize, uint16_t Ysize, uint8_t *pdata)
-{
-
- SetDisplayWindow(Xpos, Ypos, Xsize, Ysize);
-
- if(lcd_drv->DrawRGBImage != NULL)
- {
- lcd_drv->DrawRGBImage(Xpos, Ypos, Xsize, Ysize, pdata);
- }
- SetDisplayWindow(0, 0, BSP_LCD_GetXSize(), BSP_LCD_GetYSize());
-}
-
-/**
- * @brief Draws a full rectangle.
- * @param Xpos: X position
- * @param Ypos: Y position
- * @param Width: Rectangle width
- * @param Height: Rectangle height
- */
-void BSP_LCD_FillRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height)
-{
- BSP_LCD_SetTextColor(DrawProp.TextColor);
- do
- {
- BSP_LCD_DrawHLine(Xpos, Ypos++, Width);
- }
- while(Height--);
-}
-
-/**
- * @brief Draws a full circle.
- * @param Xpos: X position
- * @param Ypos: Y position
- * @param Radius: Circle radius
- */
-void BSP_LCD_FillCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius)
-{
- int32_t D; /* Decision Variable */
- uint32_t CurX; /* Current X Value */
- uint32_t CurY; /* Current Y Value */
-
- D = 3 - (Radius << 1);
-
- CurX = 0;
- CurY = Radius;
-
- BSP_LCD_SetTextColor(DrawProp.TextColor);
-
- while (CurX <= CurY)
- {
- if(CurY > 0)
- {
- BSP_LCD_DrawHLine(Xpos - CurY, Ypos + CurX, 2*CurY);
- BSP_LCD_DrawHLine(Xpos - CurY, Ypos - CurX, 2*CurY);
- }
-
- if(CurX > 0)
- {
- BSP_LCD_DrawHLine(Xpos - CurX, Ypos - CurY, 2*CurX);
- BSP_LCD_DrawHLine(Xpos - CurX, Ypos + CurY, 2*CurX);
- }
- if (D < 0)
- {
- D += (CurX << 2) + 6;
- }
- else
- {
- D += ((CurX - CurY) << 2) + 10;
- CurY--;
- }
- CurX++;
- }
-
- BSP_LCD_SetTextColor(DrawProp.TextColor);
- BSP_LCD_DrawCircle(Xpos, Ypos, Radius);
-}
-
-/**
- * @brief Draws a full poly-line (between many points).
- * @param Points: Pointer to the points array
- * @param PointCount: Number of points
- */
-void BSP_LCD_FillPolygon(pPoint Points, uint16_t PointCount)
-{
-
- int16_t X = 0, Y = 0, X2 = 0, Y2 = 0, X_center = 0, Y_center = 0, X_first = 0, Y_first = 0, pixelX = 0, pixelY = 0, counter = 0;
- uint16_t IMAGE_LEFT = 0, IMAGE_RIGHT = 0, IMAGE_TOP = 0, IMAGE_BOTTOM = 0;
-
- IMAGE_LEFT = IMAGE_RIGHT = Points->X;
- IMAGE_TOP= IMAGE_BOTTOM = Points->Y;
-
- for(counter = 1; counter < PointCount; counter++)
- {
- pixelX = POLY_X(counter);
- if(pixelX < IMAGE_LEFT)
- {
- IMAGE_LEFT = pixelX;
- }
- if(pixelX > IMAGE_RIGHT)
- {
- IMAGE_RIGHT = pixelX;
- }
-
- pixelY = POLY_Y(counter);
- if(pixelY < IMAGE_TOP)
- {
- IMAGE_TOP = pixelY;
- }
- if(pixelY > IMAGE_BOTTOM)
- {
- IMAGE_BOTTOM = pixelY;
- }
- }
-
- if(PointCount < 2)
- {
- return;
- }
-
- X_center = (IMAGE_LEFT + IMAGE_RIGHT)/2;
- Y_center = (IMAGE_BOTTOM + IMAGE_TOP)/2;
-
- X_first = Points->X;
- Y_first = Points->Y;
-
- while(--PointCount)
- {
- X = Points->X;
- Y = Points->Y;
- Points++;
- X2 = Points->X;
- Y2 = Points->Y;
-
- FillTriangle(X, X2, X_center, Y, Y2, Y_center);
- FillTriangle(X, X_center, X2, Y, Y_center, Y2);
- FillTriangle(X_center, X2, X, Y_center, Y2, Y);
- }
-
- FillTriangle(X_first, X2, X_center, Y_first, Y2, Y_center);
- FillTriangle(X_first, X_center, X2, Y_first, Y_center, Y2);
- FillTriangle(X_center, X2, X_first, Y_center, Y2, Y_first);
-}
-
-/**
- * @brief Draws a full ellipse.
- * @param Xpos: X position
- * @param Ypos: Y position
- * @param XRadius: Ellipse X radius
- * @param YRadius: Ellipse Y radius
- */
-void BSP_LCD_FillEllipse(int Xpos, int Ypos, int XRadius, int YRadius)
-{
- int x = 0, y = -YRadius, err = 2-2*XRadius, e2;
- float K = 0, rad1 = 0, rad2 = 0;
-
- rad1 = XRadius;
- rad2 = YRadius;
-
- K = (float)(rad2/rad1);
-
- do
- {
- BSP_LCD_DrawHLine((Xpos-(uint16_t)(x/K)), (Ypos+y), (2*(uint16_t)(x/K) + 1));
- BSP_LCD_DrawHLine((Xpos-(uint16_t)(x/K)), (Ypos-y), (2*(uint16_t)(x/K) + 1));
-
- e2 = err;
- if (e2 <= x)
- {
- err += ++x*2+1;
- if (-y == x && e2 <= y) e2 = 0;
- }
- if (e2 > y) err += ++y*2+1;
- }
- while (y <= 0);
-}
-
-/**
- * @brief Enables the display.
- */
-void BSP_LCD_DisplayOn(void)
-{
- lcd_drv->DisplayOn();
-}
-
-/**
- * @brief Disables the display.
- */
-void BSP_LCD_DisplayOff(void)
-{
- lcd_drv->DisplayOff();
-}
-
-/******************************************************************************
- Static Function
-*******************************************************************************/
-
-/**
- * @brief Draws a character on LCD.
- * @param Xpos: Line where to display the character shape
- * @param Ypos: Start column address
- * @param c: Pointer to the character data
- */
-static void DrawChar(uint16_t Xpos, uint16_t Ypos, const uint8_t *c)
-{
- uint32_t i = 0, j = 0;
- uint16_t height, width;
- uint8_t offset;
- uint8_t *pchar;
- uint32_t line;
-
- height = DrawProp.pFont->Height;
- width = DrawProp.pFont->Width;
-
- offset = 8 *((width + 7)/8) - width ;
-
- for(i = 0; i < height; i++)
- {
- pchar = ((uint8_t *)c + (width + 7)/8 * i);
-
- switch(((width + 7)/8))
- {
- case 1:
- line = pchar[0];
- break;
-
- case 2:
- line = (pchar[0]<< 8) | pchar[1];
- break;
-
- case 3:
- default:
- line = (pchar[0]<< 16) | (pchar[1]<< 8) | pchar[2];
- break;
- }
-
- for (j = 0; j < width; j++)
- {
- if(line & (1 << (width- j + offset- 1)))
- {
- BSP_LCD_DrawPixel((Xpos + j), Ypos, DrawProp.TextColor);
- }
- else
- {
- BSP_LCD_DrawPixel((Xpos + j), Ypos, DrawProp.BackColor);
- }
- }
- Ypos++;
- }
-}
-
-/**
- * @brief Sets display window.
- * @param Xpos: LCD X position
- * @param Ypos: LCD Y position
- * @param Width: LCD window width
- * @param Height: LCD window height
- */
-static void SetDisplayWindow(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height)
-{
- if(lcd_drv->SetDisplayWindow != NULL)
- {
- lcd_drv->SetDisplayWindow(Xpos, Ypos, Width, Height);
- }
-}
-
-/**
- * @brief Fills a triangle (between 3 points).
- * @param x1: Point 1 X position
- * @param y1: Point 1 Y position
- * @param x2: Point 2 X position
- * @param y2: Point 2 Y position
- * @param x3: Point 3 X position
- * @param y3: Point 3 Y position
- */
-static void FillTriangle(uint16_t x1, uint16_t x2, uint16_t x3, uint16_t y1, uint16_t y2, uint16_t y3)
-{
- int16_t deltax = 0, deltay = 0, x = 0, y = 0, xinc1 = 0, xinc2 = 0,
- yinc1 = 0, yinc2 = 0, den = 0, num = 0, numadd = 0, numpixels = 0,
- curpixel = 0;
-
- deltax = ABS(x2 - x1); /* The difference between the x's */
- deltay = ABS(y2 - y1); /* The difference between the y's */
- x = x1; /* Start x off at the first pixel */
- y = y1; /* Start y off at the first pixel */
-
- if (x2 >= x1) /* The x-values are increasing */
- {
- xinc1 = 1;
- xinc2 = 1;
- }
- else /* The x-values are decreasing */
- {
- xinc1 = -1;
- xinc2 = -1;
- }
-
- if (y2 >= y1) /* The y-values are increasing */
- {
- yinc1 = 1;
- yinc2 = 1;
- }
- else /* The y-values are decreasing */
- {
- yinc1 = -1;
- yinc2 = -1;
- }
-
- if (deltax >= deltay) /* There is at least one x-value for every y-value */
- {
- xinc1 = 0; /* Don't change the x when numerator >= denominator */
- yinc2 = 0; /* Don't change the y for every iteration */
- den = deltax;
- num = deltax / 2;
- numadd = deltay;
- numpixels = deltax; /* There are more x-values than y-values */
- }
- else /* There is at least one y-value for every x-value */
- {
- xinc2 = 0; /* Don't change the x for every iteration */
- yinc1 = 0; /* Don't change the y when numerator >= denominator */
- den = deltay;
- num = deltay / 2;
- numadd = deltax;
- numpixels = deltay; /* There are more y-values than x-values */
- }
-
- for (curpixel = 0; curpixel <= numpixels; curpixel++)
- {
- BSP_LCD_DrawLine(x, y, x3, y3);
-
- num += numadd; /* Increase the numerator by the top of the fraction */
- if (num >= den) /* Check if numerator >= denominator */
- {
- num -= den; /* Calculate the new numerator value */
- x += xinc1; /* Change the x as appropriate */
- y += yinc1; /* Change the y as appropriate */
- }
- x += xinc2; /* Change the x as appropriate */
- y += yinc2; /* Change the y as appropriate */
- }
-}
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
diff --git a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_lcd.h b/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_lcd.h
deleted file mode 100644
index aa66c6c7..00000000
--- a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_lcd.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/**
- ******************************************************************************
- * @file stm322xg_eval_lcd.h
- * @author MCD Application Team
- * @brief This file contains the common defines and functions prototypes for
- * the stm322xg_eval_lcd.c 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 __STM322XG_EVAL_LCD_H
-#define __STM322XG_EVAL_LCD_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm322xg_eval.h"
-#include "../Components/ili9325/ili9325.h"
-#include "../Components/ili9320/ili9320.h"
-#include "../../../Utilities/Fonts/fonts.h"
-/** @addtogroup BSP
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL_LCD
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_LCD_Exported_Types STM322xG EVAL LCD Exported Types
- * @{
- */
-typedef struct
-{
- uint32_t TextColor;
- uint32_t BackColor;
- sFONT *pFont;
-}LCD_DrawPropTypeDef;
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_LCD_Exported_Constants STM322xG EVAL LCD Exported Constants
- * @{
- */
-/**
- * @brief LCD status structure definition
- */
-#define LCD_OK 0x00
-#define LCD_ERROR 0x01
-#define LCD_TIMEOUT 0x02
-
-typedef struct
-{
- int16_t X;
- int16_t Y;
-}Point, * pPoint;
-
-/**
- * @brief Line mode structures definition
- */
-typedef enum
-{
- CENTER_MODE = 0x01, /* Center mode */
- RIGHT_MODE = 0x02, /* Right mode */
- LEFT_MODE = 0x03 /* Left mode */
-}Line_ModeTypdef;
-
-/**
- * @brief LCD color
- */
-#define LCD_COLOR_BLUE 0x001F
-#define LCD_COLOR_GREEN 0x07E0
-#define LCD_COLOR_RED 0xF800
-#define LCD_COLOR_CYAN 0x07FF
-#define LCD_COLOR_MAGENTA 0xF81F
-#define LCD_COLOR_YELLOW 0xFFE0
-#define LCD_COLOR_LIGHTBLUE 0x841F
-#define LCD_COLOR_LIGHTGREEN 0x87F0
-#define LCD_COLOR_LIGHTRED 0xFC10
-#define LCD_COLOR_LIGHTCYAN 0x87FF
-#define LCD_COLOR_LIGHTMAGENTA 0xFC1F
-#define LCD_COLOR_LIGHTYELLOW 0xFFF0
-#define LCD_COLOR_DARKBLUE 0x0010
-#define LCD_COLOR_DARKGREEN 0x0400
-#define LCD_COLOR_DARKRED 0x8000
-#define LCD_COLOR_DARKCYAN 0x0410
-#define LCD_COLOR_DARKMAGENTA 0x8010
-#define LCD_COLOR_DARKYELLOW 0x8400
-#define LCD_COLOR_WHITE 0xFFFF
-#define LCD_COLOR_LIGHTGRAY 0xD69A
-#define LCD_COLOR_GRAY 0x8410
-#define LCD_COLOR_DARKGRAY 0x4208
-#define LCD_COLOR_BLACK 0x0000
-#define LCD_COLOR_BROWN 0xA145
-#define LCD_COLOR_ORANGE 0xFD20
-
-/**
- * @brief LCD default font
- */
-#define LCD_DEFAULT_FONT Font24
-
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_LCD_Exported_Functions STM322xG EVAL LCD Exported Functions
- * @{
- */
-uint8_t BSP_LCD_Init(void);
-uint32_t BSP_LCD_GetXSize(void);
-uint32_t BSP_LCD_GetYSize(void);
-
-uint16_t BSP_LCD_GetTextColor(void);
-uint16_t BSP_LCD_GetBackColor(void);
-void BSP_LCD_SetTextColor(__IO uint16_t Color);
-void BSP_LCD_SetBackColor(__IO uint16_t Color);
-void BSP_LCD_SetFont(sFONT *fonts);
-sFONT *BSP_LCD_GetFont(void);
-
-void BSP_LCD_Clear(uint16_t Color);
-void BSP_LCD_ClearStringLine(uint16_t Line);
-void BSP_LCD_DisplayStringAtLine(uint16_t Line, uint8_t *ptr);
-void BSP_LCD_DisplayStringAt(uint16_t Xpos, uint16_t Ypos, uint8_t *Text, Line_ModeTypdef Mode);
-void BSP_LCD_DisplayChar(uint16_t Xpos, uint16_t Ypos, uint8_t Ascii);
-
-uint16_t BSP_LCD_ReadPixel(uint16_t Xpos, uint16_t Ypos);
-void BSP_LCD_DrawPixel(uint16_t Xpos, uint16_t Ypos, uint16_t RGB_Code);
-void BSP_LCD_DrawHLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length);
-void BSP_LCD_DrawVLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length);
-void BSP_LCD_DrawLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2);
-void BSP_LCD_DrawRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
-void BSP_LCD_DrawCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius);
-void BSP_LCD_DrawPolygon(pPoint Points, uint16_t PointCount);
-void BSP_LCD_DrawEllipse(int Xpos, int Ypos, int XRadius, int YRadius);
-void BSP_LCD_DrawBitmap(uint16_t Xpos, uint16_t Ypos, uint8_t *pbmp);
-void BSP_LCD_DrawRGBImage(uint16_t Xpos, uint16_t Ypos, uint16_t Xsize, uint16_t Ysize, uint8_t *pbmp);
-void BSP_LCD_FillRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Height);
-void BSP_LCD_FillCircle(uint16_t Xpos, uint16_t Ypos, uint16_t Radius);
-void BSP_LCD_FillPolygon(pPoint Points, uint16_t PointCount);
-void BSP_LCD_FillEllipse(int Xpos, int Ypos, int XRadius, int YRadius);
-
-void BSP_LCD_DisplayOff(void);
-void BSP_LCD_DisplayOn(void);
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM322XG_EVAL_LCD_H */
-
diff --git a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_sd.c b/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_sd.c
deleted file mode 100644
index 7f4c0d91..00000000
--- a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_sd.c
+++ /dev/null
@@ -1,499 +0,0 @@
-/**
- ******************************************************************************
- * @file stm322xg_eval_sd.c
- * @author MCD Application Team
- * @brief This file includes the uSD card driver mounted on STM322xG-EVAL
- * evaluation board.
- ******************************************************************************
- * @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.
- *
- ******************************************************************************
- */
-
-/* File Info : -----------------------------------------------------------------
- User NOTES
-1. How To use this driver:
---------------------------
- - This driver is used to drive the micro SD external card mounted on STM322xG-EVAL
- evaluation board.
- - This driver does not need a specific component driver for the micro SD device
- to be included with.
-
-2. Driver description:
----------------------
- + Initialization steps:
- o Initialize the micro SD card using the BSP_SD_Init() function. This
- function includes the MSP layer hardware resources initialization and the
- SDIO interface configuration to interface with the external micro SD. It
- also includes the micro SD initialization sequence.
- o To check the SD card presence you can use the function BSP_SD_IsDetected() which
- returns the detection status
- o If SD presence detection interrupt mode is desired, you must configure the
- SD detection interrupt mode by calling the function BSP_SD_ITConfig(). The interrupt
- is generated as an external interrupt whenever the micro SD card is
- plugged/unplugged in/from the evaluation board. The SD detection interrupt
- is handled by calling the function BSP_SD_DetectIT() which is called in the IRQ
- handler file, the user callback is implemented in the function BSP_SD_DetectCallback().
- o The function BSP_SD_GetCardInfo() is used to get the micro SD card information
- which is stored in the structure "HAL_SD_CardInfoTypedef".
-
- + Micro SD card operations
- o The micro SD card can be accessed with read/write block(s) operations once
- it is ready for access. The access can be performed whether using the polling
- mode by calling the functions BSP_SD_ReadBlocks()/BSP_SD_WriteBlocks(), or by DMA
- transfer using the functions BSP_SD_ReadBlocks_DMA()/BSP_SD_WriteBlocks_DMA()
- o The DMA transfer complete is used with interrupt mode. Once the SD transfer
- is complete, the SD interrupt is handled using the function BSP_SD_IRQHandler(),
- the DMA Tx/Rx transfer complete are handled using the functions
- BSP_SD_DMA_Tx_IRQHandler()/BSP_SD_DMA_Rx_IRQHandler(). The corresponding user callbacks
- are implemented by the user at application level.
- o The SD erase block(s) is performed using the function BSP_SD_Erase() with specifying
- the number of blocks to erase.
- o The SD runtime status is returned when calling the function BSP_SD_GetCardState().
-
-------------------------------------------------------------------------------*/
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm322xg_eval_sd.h"
-
-/** @addtogroup BSP
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_SD STM322xG EVAL SD
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_SD_Private_Variables STM322xG EVAL SD Private Variables
- * @{
- */
-SD_HandleTypeDef uSdHandle;
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_SD_Private_Functions STM322xG EVAL SD Private Functions
- * @{
- */
-
-/**
- * @brief Initializes the SD card device.
- * @retval SD status.
- */
-uint8_t BSP_SD_Init(void)
-{
- uint8_t SD_state = MSD_OK;
-
- /* uSD device interface configuration */
- uSdHandle.Instance = SDIO;
-
- uSdHandle.Init.ClockEdge = SDIO_CLOCK_EDGE_RISING;
- uSdHandle.Init.ClockBypass = SDIO_CLOCK_BYPASS_DISABLE;
- uSdHandle.Init.ClockPowerSave = SDIO_CLOCK_POWER_SAVE_DISABLE;
- uSdHandle.Init.BusWide = SDIO_BUS_WIDE_1B;
- uSdHandle.Init.HardwareFlowControl = SDIO_HARDWARE_FLOW_CONTROL_DISABLE;
- uSdHandle.Init.ClockDiv = SDIO_TRANSFER_CLK_DIV;
-
- /* Check if the SD card is plugged in the slot */
- if(BSP_SD_IsDetected() != SD_PRESENT)
- {
- return MSD_ERROR;
- }
-
- /* Msp SD initialization */
- BSP_SD_MspInit(&uSdHandle, NULL);
-
- if(HAL_SD_Init(&uSdHandle) != HAL_OK)
- {
- SD_state = MSD_ERROR;
- }
-
- /* Configure SD Bus width */
- if(SD_state == MSD_OK)
- {
- /* Enable wide operation */
- if(HAL_SD_ConfigWideBusOperation(&uSdHandle, SDIO_BUS_WIDE_4B) != HAL_OK)
- {
- SD_state = MSD_ERROR;
- }
- else
- {
- SD_state = MSD_OK;
- }
- }
-
- return SD_state;
-}
-
-/**
- * @brief Configures Interrupt mode for SD detection pin.
- * @retval Returns 0
- */
-uint8_t BSP_SD_ITConfig(void)
-{
- GPIO_InitTypeDef GPIO_Init_Structure;
-
- /* Configure Interrupt mode for SD detection pin */
- GPIO_Init_Structure.Mode = GPIO_MODE_IT_RISING_FALLING;
- GPIO_Init_Structure.Pull = GPIO_PULLUP;
- GPIO_Init_Structure.Speed = GPIO_SPEED_HIGH;
- GPIO_Init_Structure.Pin = SD_DETECT_PIN;
- HAL_GPIO_Init(SD_DETECT_GPIO_PORT, &GPIO_Init_Structure);
-
- /* NVIC configuration for SDIO interrupts */
- HAL_NVIC_SetPriority(SD_DETECT_IRQn, 0x0E, 0);
- HAL_NVIC_EnableIRQ(SD_DETECT_IRQn);
-
- return 0;
-}
-
-/**
- * @brief Detects if SD card is correctly plugged in the memory slot or not.
- * @retval Returns if SD is detected or not
- */
-uint8_t BSP_SD_IsDetected(void)
-{
- __IO uint8_t status = SD_PRESENT;
-
- /* Check SD card detect pin */
- if(HAL_GPIO_ReadPin(SD_DETECT_GPIO_PORT, SD_DETECT_PIN) != GPIO_PIN_RESET)
- {
- status = SD_NOT_PRESENT;
- }
-
- return status;
-}
-/**
- * @brief SD detect IT treatment
- */
-void BSP_SD_DetectIT(void)
-{
- /* SD detect IT callback */
- BSP_SD_DetectCallback();
-
-}
-
-/**
- * @brief SD detect IT detection callback
- */
-__weak void BSP_SD_DetectCallback(void)
-{
- /* NOTE: This function Should not be modified, when the callback is needed,
- the BSP_SD_DetectCallback could be implemented in the user file
- */
-
-}
-
-/**
- * @brief Reads block(s) from a specified address in an SD card, in polling mode.
- * @param pData: Pointer to the buffer that will contain the data to transmit
- * @param ReadAddr: Address from where data is to be read
- * @param NumOfBlocks: Number of SD blocks to read
- * @param Timeout: Timeout for read operation
- * @retval SD status
- */
-uint8_t BSP_SD_ReadBlocks(uint32_t *pData, uint32_t ReadAddr, uint32_t NumOfBlocks, uint32_t Timeout)
-{
- if(HAL_SD_ReadBlocks(&uSdHandle, (uint8_t *)pData, ReadAddr, NumOfBlocks, Timeout) != HAL_OK)
- {
- return MSD_ERROR;
- }
- else
- {
- return MSD_OK;
- }
-}
-
-/**
- * @brief Writes block(s) to a specified address in an SD card, in polling mode.
- * @param pData: Pointer to the buffer that will contain the data to transmit
- * @param WriteAddr: Address from where data is to be written
- * @param NumOfBlocks: Number of SD blocks to write
- * @param Timeout: Timeout for write operation
- * @retval SD status
- */
-uint8_t BSP_SD_WriteBlocks(uint32_t *pData, uint32_t WriteAddr, uint32_t NumOfBlocks, uint32_t Timeout)
-{
- if(HAL_SD_WriteBlocks(&uSdHandle, (uint8_t *)pData, WriteAddr, NumOfBlocks, Timeout) != HAL_OK)
- {
- return MSD_ERROR;
- }
- else
- {
- return MSD_OK;
- }
-}
-
-/**
- * @brief Reads block(s) from a specified address in an SD card, in DMA mode.
- * @param pData: Pointer to the buffer that will contain the data to transmit
- * @param ReadAddr: Address from where data is to be read
- * @param NumOfBlocks: Number of SD blocks to read
- * @retval SD status
- */
-uint8_t BSP_SD_ReadBlocks_DMA(uint32_t *pData, uint32_t ReadAddr, uint32_t NumOfBlocks)
-{
- /* Read block(s) in DMA transfer mode */
- if(HAL_SD_ReadBlocks_DMA(&uSdHandle, (uint8_t *)pData, ReadAddr, NumOfBlocks) != HAL_OK)
- {
- return MSD_ERROR;
- }
- else
- {
- return MSD_OK;
- }
-}
-
-/**
- * @brief Writes block(s) to a specified address in an SD card, in DMA mode.
- * @param pData: Pointer to the buffer that will contain the data to transmit
- * @param WriteAddr: Address from where data is to be written
- * @param NumOfBlocks: Number of SD blocks to write
- * @retval SD status
- */
-uint8_t BSP_SD_WriteBlocks_DMA(uint32_t *pData, uint32_t WriteAddr, uint32_t NumOfBlocks)
-{
- /* Write block(s) in DMA transfer mode */
- if(HAL_SD_WriteBlocks_DMA(&uSdHandle, (uint8_t *)pData, WriteAddr, NumOfBlocks) != HAL_OK)
- {
- return MSD_ERROR;
- }
- else
- {
- return MSD_OK;
- }
-}
-
-/**
- * @brief Erases the specified memory area of the given SD card.
- * @param StartAddr: Start byte address
- * @param EndAddr: End byte address
- * @retval SD status
- */
-uint8_t BSP_SD_Erase(uint32_t StartAddr, uint32_t EndAddr)
-{
- if(HAL_SD_Erase(&uSdHandle, StartAddr, EndAddr) != HAL_OK)
- {
- return MSD_ERROR;
- }
- else
- {
- return MSD_OK;
- }
-}
-
-/**
- * @brief Initializes the SD MSP.
- * @param hsd: SD handle
- * @param Params : pointer on additional configuration parameters, can be NULL.
- */
-__weak void BSP_SD_MspInit(SD_HandleTypeDef *hsd, void *Params)
-{
- static DMA_HandleTypeDef dmaRxHandle;
- static DMA_HandleTypeDef dmaTxHandle;
- GPIO_InitTypeDef GPIO_Init_Structure;
-
- /* Enable SDIO clock */
- __HAL_RCC_SDIO_CLK_ENABLE();
-
- /* Enable DMA2 clocks */
- __DMAx_TxRx_CLK_ENABLE();
-
- /* Enable GPIOs clock */
- __HAL_RCC_GPIOC_CLK_ENABLE();
- __HAL_RCC_GPIOD_CLK_ENABLE();
- __SD_DETECT_GPIO_CLK_ENABLE();
-
- /* Common GPIO configuration */
- GPIO_Init_Structure.Mode = GPIO_MODE_AF_PP;
- GPIO_Init_Structure.Pull = GPIO_PULLUP;
- GPIO_Init_Structure.Speed = GPIO_SPEED_HIGH;
- GPIO_Init_Structure.Alternate = GPIO_AF12_SDIO;
-
- /* GPIOC configuration */
- GPIO_Init_Structure.Pin = GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12;
-
- HAL_GPIO_Init(GPIOC, &GPIO_Init_Structure);
-
- /* GPIOD configuration */
- GPIO_Init_Structure.Pin = GPIO_PIN_2;
- HAL_GPIO_Init(GPIOD, &GPIO_Init_Structure);
-
- /* SD Card detect pin configuration */
- GPIO_Init_Structure.Mode = GPIO_MODE_INPUT;
- GPIO_Init_Structure.Pull = GPIO_PULLUP;
- GPIO_Init_Structure.Speed = GPIO_SPEED_HIGH;
- GPIO_Init_Structure.Pin = SD_DETECT_PIN;
- HAL_GPIO_Init(SD_DETECT_GPIO_PORT, &GPIO_Init_Structure);
-
- /* NVIC configuration for SDIO interrupts */
- HAL_NVIC_SetPriority(SDIO_IRQn, 0x0E, 0);
- HAL_NVIC_EnableIRQ(SDIO_IRQn);
-
- /* Configure DMA Rx parameters */
- dmaRxHandle.Init.Channel = SD_DMAx_Rx_CHANNEL;
- dmaRxHandle.Init.Direction = DMA_PERIPH_TO_MEMORY;
- dmaRxHandle.Init.PeriphInc = DMA_PINC_DISABLE;
- dmaRxHandle.Init.MemInc = DMA_MINC_ENABLE;
- dmaRxHandle.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD;
- dmaRxHandle.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;
- dmaRxHandle.Init.Mode = DMA_PFCTRL;
- dmaRxHandle.Init.Priority = DMA_PRIORITY_VERY_HIGH;
- dmaRxHandle.Init.FIFOMode = DMA_FIFOMODE_ENABLE;
- dmaRxHandle.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL;
- dmaRxHandle.Init.MemBurst = DMA_MBURST_INC4;
- dmaRxHandle.Init.PeriphBurst = DMA_PBURST_INC4;
-
- dmaRxHandle.Instance = SD_DMAx_Rx_STREAM;
-
- /* Associate the DMA handle */
- __HAL_LINKDMA(hsd, hdmarx, dmaRxHandle);
-
- /* Deinitialize the stream for new transfer */
- HAL_DMA_DeInit(&dmaRxHandle);
-
- /* Configure the DMA stream */
- HAL_DMA_Init(&dmaRxHandle);
-
- /* Configure DMA Tx parameters */
- dmaTxHandle.Init.Channel = SD_DMAx_Tx_CHANNEL;
- dmaTxHandle.Init.Direction = DMA_MEMORY_TO_PERIPH;
- dmaTxHandle.Init.PeriphInc = DMA_PINC_DISABLE;
- dmaTxHandle.Init.MemInc = DMA_MINC_ENABLE;
- dmaTxHandle.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD;
- dmaTxHandle.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;
- dmaTxHandle.Init.Mode = DMA_PFCTRL;
- dmaTxHandle.Init.Priority = DMA_PRIORITY_VERY_HIGH;
- dmaTxHandle.Init.FIFOMode = DMA_FIFOMODE_ENABLE;
- dmaTxHandle.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL;
- dmaTxHandle.Init.MemBurst = DMA_MBURST_INC4;
- dmaTxHandle.Init.PeriphBurst = DMA_PBURST_INC4;
-
- dmaTxHandle.Instance = SD_DMAx_Tx_STREAM;
-
- /* Associate the DMA handle */
- __HAL_LINKDMA(hsd, hdmatx, dmaTxHandle);
-
- /* Deinitialize the stream for new transfer */
- HAL_DMA_DeInit(&dmaTxHandle);
-
- /* Configure the DMA stream */
- HAL_DMA_Init(&dmaTxHandle);
-
- /* NVIC configuration for DMA transfer complete interrupt */
- HAL_NVIC_SetPriority(SD_DMAx_Rx_IRQn, 0x0F, 0);
- HAL_NVIC_EnableIRQ(SD_DMAx_Rx_IRQn);
-
- /* NVIC configuration for DMA transfer complete interrupt */
- HAL_NVIC_SetPriority(SD_DMAx_Tx_IRQn, 0x0F, 0);
- HAL_NVIC_EnableIRQ(SD_DMAx_Tx_IRQn);
-}
-
-/**
- * @brief Gets the current SD card data status.
- * @retval Data transfer state.
- * This value can be one of the following values:
- * @arg SD_TRANSFER_OK: No data transfer is acting
- * @arg SD_TRANSFER_BUSY: Data transfer is acting
- */
-uint8_t BSP_SD_GetCardState(void)
-{
- return((HAL_SD_GetCardState(&uSdHandle) == HAL_SD_CARD_TRANSFER ) ? SD_TRANSFER_OK : SD_TRANSFER_BUSY);
-}
-
-
-/**
- * @brief Get SD information about specific SD card.
- * @param CardInfo: Pointer to HAL_SD_CardInfoTypedef structure
- * @retval None
- */
-void BSP_SD_GetCardInfo(HAL_SD_CardInfoTypeDef *CardInfo)
-{
- /* Get SD card Information */
- HAL_SD_GetCardInfo(&uSdHandle, CardInfo);
-}
-
-/**
- * @brief SD Abort callbacks
- * @param hsd: SD handle
- * @retval None
- */
-void HAL_SD_AbortCallback(SD_HandleTypeDef *hsd)
-{
- BSP_SD_AbortCallback();
-}
-
-/**
- * @brief Tx Transfer completed callbacks
- * @param hsd: SD handle
- * @retval None
- */
-void HAL_SD_TxCpltCallback(SD_HandleTypeDef *hsd)
-{
- BSP_SD_WriteCpltCallback();
-}
-
-/**
- * @brief Rx Transfer completed callbacks
- * @param hsd: SD handle
- * @retval None
- */
-void HAL_SD_RxCpltCallback(SD_HandleTypeDef *hsd)
-{
- BSP_SD_ReadCpltCallback();
-}
-
-/**
- * @brief BSP SD Abort callbacks
- * @retval None
- */
-__weak void BSP_SD_AbortCallback(void)
-{
-
-}
-
-/**
- * @brief BSP Tx Transfer completed callbacks
- * @retval None
- */
-__weak void BSP_SD_WriteCpltCallback(void)
-{
-
-}
-
-/**
- * @brief BSP Rx Transfer completed callbacks
- * @retval None
- */
-__weak void BSP_SD_ReadCpltCallback(void)
-{
-
-}
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
diff --git a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_sd.h b/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_sd.h
deleted file mode 100644
index c6637499..00000000
--- a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_sd.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- ******************************************************************************
- * @file stm322xg_eval_sd.h
- * @author MCD Application Team
- * @brief This file contains the common defines and functions prototypes for
- * the stm322xg_eval_sd.c 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 __STM322xG_EVAL_SD_H
-#define __STM322xG_EVAL_SD_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f2xx_hal.h"
-
-/** @addtogroup BSP
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL_SD
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_SD_Exported_Types STM322xG EVAL SD Exported Types
- * @{
- */
-
-/**
- * @brief SD Card information structure
- */
-#define BSP_SD_CardInfo HAL_SD_CardInfoTypeDef
-/**
- * @}
- */
-
-
-/** @defgroup STM322xG_EVAL_SD_Exported_Constants STM322xG EVAL SD Exported Constants
- * @{
- */
-/**
- * @brief SD status structure definition
- */
-#define MSD_OK ((uint8_t)0x00)
-#define MSD_ERROR ((uint8_t)0x01)
-
-/**
- * @brief SD transfer state definition
- */
-#define SD_TRANSFER_OK ((uint8_t)0x00)
-#define SD_TRANSFER_BUSY ((uint8_t)0x01)
-
-#define SD_DETECT_PIN GPIO_PIN_13
-#define SD_DETECT_GPIO_PORT GPIOH
-#define __SD_DETECT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOH_CLK_ENABLE()
-#define SD_DETECT_IRQn EXTI15_10_IRQn
-
-#define SD_DATATIMEOUT ((uint32_t)100000000)
-
-#define SD_PRESENT ((uint8_t)0x01)
-#define SD_NOT_PRESENT ((uint8_t)0x00)
-
-/* DMA definitions for SD DMA transfer */
-#define __DMAx_TxRx_CLK_ENABLE __HAL_RCC_DMA2_CLK_ENABLE
-#define SD_DMAx_Tx_CHANNEL DMA_CHANNEL_4
-#define SD_DMAx_Rx_CHANNEL DMA_CHANNEL_4
-#define SD_DMAx_Tx_STREAM DMA2_Stream6
-#define SD_DMAx_Rx_STREAM DMA2_Stream3
-#define SD_DMAx_Tx_IRQn DMA2_Stream6_IRQn
-#define SD_DMAx_Rx_IRQn DMA2_Stream3_IRQn
-#define BSP_SD_IRQHandler SDIO_IRQHandler
-#define BSP_SD_DMA_Tx_IRQHandler DMA2_Stream6_IRQHandler
-#define BSP_SD_DMA_Rx_IRQHandler DMA2_Stream3_IRQHandler
-#define SD_DetectIRQHandler() HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_13)
-
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_SD_Exported_Functions STM322xG EVAL SD Exported Functions
- * @{
- */
-uint8_t BSP_SD_Init(void);
-uint8_t BSP_SD_ITConfig(void);
-void BSP_SD_DetectIT(void);
-void BSP_SD_DetectCallback(void);
-uint8_t BSP_SD_ReadBlocks(uint32_t *pData, uint32_t ReadAddr, uint32_t NumOfBlocks, uint32_t Timeout);
-uint8_t BSP_SD_WriteBlocks(uint32_t *pData, uint32_t WriteAddr, uint32_t NumOfBlocks, uint32_t Timeout);
-uint8_t BSP_SD_ReadBlocks_DMA(uint32_t *pData, uint32_t ReadAddr, uint32_t NumOfBlocks);
-uint8_t BSP_SD_WriteBlocks_DMA(uint32_t *pData, uint32_t WriteAddr, uint32_t NumOfBlocks);
-uint8_t BSP_SD_Erase(uint32_t StartAddr, uint32_t EndAddr);
-uint8_t BSP_SD_GetCardState(void);
-void BSP_SD_GetCardInfo(HAL_SD_CardInfoTypeDef *CardInfo);
-uint8_t BSP_SD_IsDetected(void);
-
-/* These functions can be modified in case the current settings (e.g. DMA stream)
- need to be changed for specific application needs */
-void BSP_SD_MspInit(SD_HandleTypeDef *hsd, void *Params);
-void BSP_SD_Detect_MspInit(SD_HandleTypeDef *hsd, void *Params);
-void BSP_SD_MspDeInit(SD_HandleTypeDef *hsd, void *Params);
-void BSP_SD_AbortCallback(void);
-void BSP_SD_WriteCpltCallback(void);
-void BSP_SD_ReadCpltCallback(void);
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM322xG_EVAL_SD_H */
-
diff --git a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_sram.c b/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_sram.c
deleted file mode 100644
index 0163679d..00000000
--- a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_sram.c
+++ /dev/null
@@ -1,307 +0,0 @@
-/**
- ******************************************************************************
- * @file stm322xg_eval_sram.c
- * @author MCD Application Team
- * @brief This file includes the SRAM driver for the IS61WV102416BLL-10MLI memory
- * device mounted on STM322xG-EVAL evaluation board.
- ******************************************************************************
- * @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.
- *
- ******************************************************************************
- */
-
-/* File Info : -----------------------------------------------------------------
- User NOTES
-1. How To use this driver:
---------------------------
- - This driver is used to drive the IS61WV102416BLL-10MLI SRAM external memory mounted
- on STM322xG-EVAL evaluation board.
- - This driver does not need a specific component driver for the SRAM device
- to be included with.
-
-2. Driver description:
----------------------
- + Initialization steps:
- o Initialize the SRAM external memory using the BSP_SRAM_Init() function. This
- function includes the MSP layer hardware resources initialization and the
- FSMC controller configuration to interface with the external SRAM memory.
-
- + SRAM read/write operations
- o SRAM external memory can be accessed with read/write operations once it is
- initialized.
- Read/write operation can be performed with AHB access using the functions
- BSP_SRAM_ReadData()/BSP_SRAM_WriteData(), or by DMA transfer using the functions
- BSP_SRAM_ReadData_DMA()/BSP_SRAM_WriteData_DMA().
- o The AHB access is performed with 16-bit width transaction, the DMA transfer
- configuration is fixed at single (no burst) halfword transfer
- (see the SRAM_MspInit() static function).
- o User can implement his own functions for read/write access with his desired
- configurations.
- o If interrupt mode is used for DMA transfer, the function BSP_SRAM_DMA_IRQHandler()
- is called in IRQ handler file, to serve the generated interrupt once the DMA
- transfer is complete.
-
-------------------------------------------------------------------------------*/
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm322xg_eval_sram.h"
-
-/** @addtogroup BSP
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_SRAM STM322xG EVAL SRAM
- * @{
- */
-
-
-/** @defgroup STM322xG_EVAL_SRAM_Private_Variables STM322xG EVAL SRAM Private Variables
- * @{
- */
-static SRAM_HandleTypeDef sramHandle;
-static FSMC_NORSRAM_TimingTypeDef Timing;
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_SRAM_Private_Functions STM322xG EVAL SRAM Private Functions
- * @{
- */
-
-/**
- * @brief Initializes the SRAM device.
- * @retval SRAM status
- */
-uint8_t BSP_SRAM_Init(void)
-{
- sramHandle.Instance = FSMC_NORSRAM_DEVICE;
- sramHandle.Extended = FSMC_NORSRAM_EXTENDED_DEVICE;
-
- /* SRAM device configuration */
- Timing.AddressSetupTime = 2;
- Timing.AddressHoldTime = 1;
- Timing.DataSetupTime = 2;
- Timing.BusTurnAroundDuration = 1;
- Timing.CLKDivision = 2;
- Timing.DataLatency = 2;
- Timing.AccessMode = FSMC_ACCESS_MODE_A;
-
- sramHandle.Init.NSBank = FSMC_NORSRAM_BANK2;
- sramHandle.Init.DataAddressMux = FSMC_DATA_ADDRESS_MUX_DISABLE;
- sramHandle.Init.MemoryType = FSMC_MEMORY_TYPE_SRAM;
- sramHandle.Init.MemoryDataWidth = SRAM_MEMORY_WIDTH;
- sramHandle.Init.BurstAccessMode = SRAM_BURSTACCESS;
- sramHandle.Init.WaitSignalPolarity = FSMC_WAIT_SIGNAL_POLARITY_LOW;
- sramHandle.Init.WrapMode = FSMC_WRAP_MODE_DISABLE;
- sramHandle.Init.WaitSignalActive = FSMC_WAIT_TIMING_BEFORE_WS;
- sramHandle.Init.WriteOperation = FSMC_WRITE_OPERATION_ENABLE;
- sramHandle.Init.WaitSignal = FSMC_WAIT_SIGNAL_DISABLE;
- sramHandle.Init.ExtendedMode = FSMC_EXTENDED_MODE_DISABLE;
- sramHandle.Init.AsynchronousWait = FSMC_ASYNCHRONOUS_WAIT_DISABLE;
- sramHandle.Init.WriteBurst = SRAM_WRITEBURST;
-
- /* SRAM controller initialization */
- BSP_SRAM_MspInit();
- if(HAL_SRAM_Init(&sramHandle, &Timing, &Timing) != HAL_OK)
- {
- return SRAM_ERROR;
- }
- else
- {
- return SRAM_OK;
- }
-}
-
-/**
- * @brief Reads an amount of data from the SRAM device in polling mode.
- * @param uwStartAddress : Read start address
- * @param pData: Pointer to data to be read
- * @param uwDataSize: Size of read data from the memory
- * @retval SRAM status
- */
-uint8_t BSP_SRAM_ReadData(uint32_t uwStartAddress, uint16_t *pData, uint32_t uwDataSize)
-{
- if(HAL_SRAM_Read_16b(&sramHandle, (uint32_t *)uwStartAddress, pData, uwDataSize) != HAL_OK)
- {
- return SRAM_ERROR;
- }
- else
- {
- return SRAM_OK;
- }
-}
-
-/**
- * @brief Reads an amount of data from the SRAM device in DMA mode.
- * @param uwStartAddress : Read start address
- * @param pData: Pointer to data to be read
- * @param uwDataSize: Size of read data from the memory
- * @retval SRAM status
- */
-uint8_t BSP_SRAM_ReadData_DMA(uint32_t uwStartAddress, uint16_t *pData, uint32_t uwDataSize)
-{
- if(HAL_SRAM_Read_DMA(&sramHandle, (uint32_t *)uwStartAddress, (uint32_t *)pData, uwDataSize) != HAL_OK)
- {
- return SRAM_ERROR;
- }
- else
- {
- return SRAM_OK;
- }
-}
-
-/**
- * @brief Writes an amount of data from the SRAM device in polling mode.
- * @param uwStartAddress: Write start address
- * @param pData: Pointer to data to be written
- * @param uwDataSize: Size of written data from the memory
- * @retval SRAM status
- */
-uint8_t BSP_SRAM_WriteData(uint32_t uwStartAddress, uint16_t *pData, uint32_t uwDataSize)
-{
- if(HAL_SRAM_Write_16b(&sramHandle, (uint32_t *)uwStartAddress, pData, uwDataSize) != HAL_OK)
- {
- return SRAM_ERROR;
- }
- else
- {
- return SRAM_OK;
- }
-}
-
-/**
- * @brief Writes an amount of data from the SRAM device in DMA mode.
- * @param uwStartAddress: Write start address
- * @param pData: Pointer to data to be written
- * @param uwDataSize: Size of written data from the memory
- * @retval SRAM status
- */
-uint8_t BSP_SRAM_WriteData_DMA(uint32_t uwStartAddress, uint16_t *pData, uint32_t uwDataSize)
-{
- if(HAL_SRAM_Write_DMA(&sramHandle, (uint32_t *)uwStartAddress, (uint32_t *)pData, uwDataSize) != HAL_OK)
- {
- return SRAM_ERROR;
- }
- else
- {
- return SRAM_OK;
- }
-}
-
-/**
- * @brief Handles SRAM DMA transfer interrupt request.
- */
-void BSP_SRAM_DMA_IRQHandler(void)
-{
- HAL_DMA_IRQHandler(sramHandle.hdma);
-}
-
-/**
- * @brief Initializes SRAM MSP.
- */
-__weak void BSP_SRAM_MspInit(void)
-{
- static DMA_HandleTypeDef dmaHandle;
- GPIO_InitTypeDef GPIO_Init_Structure;
- SRAM_HandleTypeDef *hsram = &sramHandle;
-
- /* Enable FSMC clock */
- __HAL_RCC_FSMC_CLK_ENABLE();
-
- /* Enable chosen DMAx clock */
- __SRAM_DMAx_CLK_ENABLE();
-
- /* Enable GPIOs clock */
- __HAL_RCC_GPIOD_CLK_ENABLE();
- __HAL_RCC_GPIOE_CLK_ENABLE();
- __HAL_RCC_GPIOF_CLK_ENABLE();
- __HAL_RCC_GPIOG_CLK_ENABLE();
-
- /* Common GPIO configuration */
- GPIO_Init_Structure.Mode = GPIO_MODE_AF_PP;
- GPIO_Init_Structure.Pull = GPIO_PULLUP;
- GPIO_Init_Structure.Speed = GPIO_SPEED_HIGH;
- GPIO_Init_Structure.Alternate = GPIO_AF12_FSMC;
-
- /* GPIOD configuration */
- GPIO_Init_Structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_8 |\
- GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 |\
- GPIO_PIN_14 | GPIO_PIN_15;
-
- HAL_GPIO_Init(GPIOD, &GPIO_Init_Structure);
-
- /* GPIOE configuration */
- GPIO_Init_Structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_3| GPIO_PIN_4 | GPIO_PIN_7 |\
- GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12 |\
- GPIO_PIN_13 | GPIO_PIN_14 | GPIO_PIN_15;
- HAL_GPIO_Init(GPIOE, &GPIO_Init_Structure);
-
- /* GPIOF configuration */
- GPIO_Init_Structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2| GPIO_PIN_3 | GPIO_PIN_4 |\
- GPIO_PIN_5 | GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 | GPIO_PIN_15;
- HAL_GPIO_Init(GPIOF, &GPIO_Init_Structure);
-
- /* GPIOG configuration */
- GPIO_Init_Structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2| GPIO_PIN_3 | GPIO_PIN_4 |\
- GPIO_PIN_5 | GPIO_PIN_9;
-
- HAL_GPIO_Init(GPIOG, &GPIO_Init_Structure);
-
-
- /* Configure common DMA parameters */
- dmaHandle.Init.Channel = SRAM_DMAx_CHANNEL;
- dmaHandle.Init.Direction = DMA_MEMORY_TO_MEMORY;
- dmaHandle.Init.PeriphInc = DMA_PINC_ENABLE;
- dmaHandle.Init.MemInc = DMA_MINC_ENABLE;
- dmaHandle.Init.PeriphDataAlignment = DMA_PDATAALIGN_HALFWORD;
- dmaHandle.Init.MemDataAlignment = DMA_MDATAALIGN_HALFWORD;
- dmaHandle.Init.Mode = DMA_NORMAL;
- dmaHandle.Init.Priority = DMA_PRIORITY_HIGH;
- dmaHandle.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
- dmaHandle.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL;
- dmaHandle.Init.MemBurst = DMA_MBURST_INC8;
- dmaHandle.Init.PeriphBurst = DMA_PBURST_INC8;
-
- dmaHandle.Instance = SRAM_DMAx_STREAM;
-
- /* Associate the DMA handle */
- __HAL_LINKDMA(hsram, hdma, dmaHandle);
-
- /* Deinitialize the stream for new transfer */
- HAL_DMA_DeInit(&dmaHandle);
-
- /* Configure the DMA stream */
- HAL_DMA_Init(&dmaHandle);
-
- /* NVIC configuration for DMA transfer complete interrupt */
- HAL_NVIC_SetPriority(SRAM_DMAx_IRQn, 0x0F, 0);
- HAL_NVIC_EnableIRQ(SRAM_DMAx_IRQn);
-}
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
diff --git a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_sram.h b/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_sram.h
deleted file mode 100644
index 466dcf81..00000000
--- a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_sram.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- ******************************************************************************
- * @file stm322xg_eval_sram.h
- * @author MCD Application Team
- * @brief This file contains the common defines and functions prototypes for
- * the stm322xg_eval_sram.c 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 __STM322xG_EVAL_SRAM_H
-#define __STM322xG_EVAL_SRAM_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm32f2xx_hal.h"
-
-/** @addtogroup BSP
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL_SRAM
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_SRAM_Exported_Constants STM322xG EVAL SRAM Exported Constants
- * @{
- */
-
-/**
- * @brief SD status structure definition
- */
-#define SRAM_OK 0x00
-#define SRAM_ERROR 0x01
-
-#define SRAM_DEVICE_ADDR ((uint32_t)0x64000000)
-#define SRAM_DEVICE_SIZE ((uint32_t)0x200000) /* SRAM device size in Bytes */
-
-/* #define SRAM_MEMORY_WIDTH FSMC_NORSRAM_MEM_BUS_WIDTH_8 */
-#define SRAM_MEMORY_WIDTH FSMC_NORSRAM_MEM_BUS_WIDTH_16
-
-#define SRAM_BURSTACCESS FSMC_BURST_ACCESS_MODE_DISABLE
-/* #define SRAM_BURSTACCESS FSMC_BURST_ACCESS_MODE_ENABLE */
-
-#define SRAM_WRITEBURST FSMC_WRITE_BURST_DISABLE
-/* #define SRAM_WRITEBURST FSMC_WRITE_BURST_ENABLE */
-
-/* DMA definitions for SRAM DMA transfer */
-#define __SRAM_DMAx_CLK_ENABLE __HAL_RCC_DMA2_CLK_ENABLE
-#define SRAM_DMAx_CHANNEL DMA_CHANNEL_0
-#define SRAM_DMAx_STREAM DMA2_Stream0
-#define SRAM_DMAx_IRQn DMA2_Stream0_IRQn
-#define SRAM_DMAx_IRQHandler DMA2_Stream0_IRQHandler
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_SRAM_Exported_Functions STM322xG EVAL SRAM Exported Functions
- * @{
- */
-uint8_t BSP_SRAM_Init(void);
-uint8_t BSP_SRAM_ReadData(uint32_t uwStartAddress, uint16_t *pData, uint32_t uwDataSize);
-uint8_t BSP_SRAM_ReadData_DMA(uint32_t uwStartAddress, uint16_t *pData, uint32_t uwDataSize);
-uint8_t BSP_SRAM_WriteData(uint32_t uwStartAddress, uint16_t *pData, uint32_t uwDataSize);
-uint8_t BSP_SRAM_WriteData_DMA(uint32_t uwStartAddress, uint16_t *pData, uint32_t uwDataSize);
-void BSP_SRAM_DMA_IRQHandler(void);
-void BSP_SRAM_MspInit(void);
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM322xG_EVAL_SRAM_H */
-
diff --git a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_ts.c b/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_ts.c
deleted file mode 100644
index 73099cef..00000000
--- a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_ts.c
+++ /dev/null
@@ -1,218 +0,0 @@
-/**
- ******************************************************************************
- * @file stm322xg_eval_ts.c
- * @author MCD Application Team
- * @brief This file provides a set of functions needed to manage the touch
- * screen on STM322xG-EVAL evaluation board.
- ******************************************************************************
- * @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.
- *
- ******************************************************************************
- */
-
-/* File Info : -----------------------------------------------------------------
- User NOTES
-1. How To use this driver:
---------------------------
- - This driver is used to drive the touch screen module of the STM322xG-EVAL
- evaluation board on the ILI9325 LCD mounted on MB785 daughter board .
- - The STMPE811 IO expander device component driver must be included with this
- driver in order to run the TS module commanded by the IO expander device
- mounted on the evaluation board.
-
-2. Driver description:
----------------------
- + Initialization steps:
- o Initialize the TS module using the BSP_TS_Init() function. This
- function includes the MSP layer hardware resources initialization and the
- communication layer configuration to start the TS use. The LCD size properties
- (x and y) are passed as parameters.
- o If TS interrupt mode is desired, you must configure the TS interrupt mode
- by calling the function BSP_TS_ITConfig(). The TS interrupt mode is generated
- as an external interrupt whenever a touch is detected.
-
- + Touch screen use
- o The touch screen state is captured whenever the function BSP_TS_GetState() is
- used. This function returns information about the last LCD touch occurred
- in the TS_StateTypeDef structure.
- o If TS interrupt mode is used, the function BSP_TS_ITGetStatus() is needed to get
- the interrupt status. To clear the IT pending bits, you should call the
- function BSP_TS_ITClear().
- o The IT is handled using the corresponding external interrupt IRQ handler,
- the user IT callback treatment is implemented on the same external interrupt
- callback.
-
-------------------------------------------------------------------------------*/
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm322xg_eval_ts.h"
-
-/** @addtogroup BSP
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_TS STM322xG EVAL TS
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_TS_Private_Variables STM322xG EVAL TS Private Variables
- * @{
- */
-static TS_DrvTypeDef *ts_driver;
-static uint16_t ts_x_boundary, ts_y_boundary;
-static uint8_t ts_orientation;
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_TS_Private_Function_Prototypes STM322xG EVAL TS Private Function Prototypes
- * @{
- */
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_TS_Private_Functions STM322xG EVAL TS Private Functions
- * @{
- */
-
-/**
- * @brief Initializes and configures the touch screen functionalities and
- * configures all necessary hardware resources (GPIOs, clocks..).
- * @param xSize: Maximum X size of the TS area on LCD
- * @param ySize: Maximum Y size of the TS area on LCD
- * @retval TS_OK if all initializations are OK. Other value if error.
- */
-uint8_t BSP_TS_Init(uint16_t xSize, uint16_t ySize)
-{
- uint8_t ret = TS_ERROR;
-
- if(stmpe811_ts_drv.ReadID(TS_I2C_ADDRESS) == STMPE811_ID)
- {
- /* Initialize the TS driver structure */
- ts_driver = &stmpe811_ts_drv;
-
- /* Initialize x and y positions boundaries */
- ts_x_boundary = xSize;
- ts_y_boundary = ySize;
- ts_orientation = TS_SWAP_XY;
- ret = TS_OK;
- }
-
- if(ret == TS_OK)
- {
- /* Initialize the LL TS Driver */
- ts_driver->Init(TS_I2C_ADDRESS);
- ts_driver->Start(TS_I2C_ADDRESS);
- }
-
- return ret;
-}
-
-/**
- * @brief Configures and enables the touch screen interrupts.
- * @retval TS_OK if all initializations are OK. Other value if error.
- */
-uint8_t BSP_TS_ITConfig(void)
-{
- /* Call component driver to enable TS ITs */
- ts_driver->EnableIT(TS_I2C_ADDRESS);
-
- return TS_OK;
-}
-
-/**
- * @brief Gets the touch screen interrupt status.
- * @retval TS_OK if all initializations are OK. Other value if error.
- */
-uint8_t BSP_TS_ITGetStatus(void)
-{
- /* Call component driver to enable TS ITs */
- return (ts_driver->GetITStatus(TS_I2C_ADDRESS));
-}
-
-/**
- * @brief Returns status and positions of the touch screen.
- * @param TS_State: Pointer to touch screen current state structure
- * @retval TS_OK if all initializations are OK. Other value if error.
- */
-uint8_t BSP_TS_GetState(TS_StateTypeDef *TS_State)
-{
- static uint32_t _x = 0, _y = 0;
- uint16_t xDiff, yDiff , x , y;
- uint16_t swap;
-
- TS_State->TouchDetected = ts_driver->DetectTouch(TS_I2C_ADDRESS);
-
- if(TS_State->TouchDetected)
- {
- ts_driver->GetXY(TS_I2C_ADDRESS, &x, &y);
-
- if(ts_orientation & TS_SWAP_X)
- {
- x = 4096 - x;
- }
-
- if(ts_orientation & TS_SWAP_Y)
- {
- y = 4096 - y;
- }
-
- if(ts_orientation & TS_SWAP_XY)
- {
- swap = y;
- y = x;
- x = swap;
- }
-
- xDiff = x > _x? (x - _x): (_x - x);
- yDiff = y > _y? (y - _y): (_y - y);
-
- if (xDiff + yDiff > 5)
- {
- _x = x;
- _y = y;
- }
-
- TS_State->x = (ts_x_boundary * _x) >> 12;
- TS_State->y = (ts_y_boundary * _y) >> 12;
- }
-
- return TS_OK;
-}
-
-/**
- * @brief Clears all touch screen interrupts.
- */
-void BSP_TS_ITClear(void)
-{
- ts_driver->ClearIT(TS_I2C_ADDRESS);
-}
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
diff --git a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_ts.h b/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_ts.h
deleted file mode 100644
index b5de7612..00000000
--- a/Drivers/BSP/STM322xG_EVAL/stm322xg_eval_ts.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- ******************************************************************************
- * @file stm322xg_eval_ts.h
- * @author MCD Application Team
- * @brief This file contains the common defines and functions prototypes for
- * the stm322xg_eval_ts.c 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 __STM322xG_EVAL_TS_H
-#define __STM322xG_EVAL_TS_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/* Includes ------------------------------------------------------------------*/
-#include "stm322xg_eval.h"
-/* Include IOExpander(STMPE811) component Driver */
-#include "../Components/stmpe811/stmpe811.h"
-
-/** @addtogroup BSP
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL
- * @{
- */
-
-/** @addtogroup STM322xG_EVAL_TS
- * @{
- */
-
-/** @defgroup STM322xG_EVAL_TS_Exported_Types STM322xG EVAL TS Exported Types
- * @{
- */
-typedef struct
-{
- uint16_t TouchDetected;
- uint16_t x;
- uint16_t y;
- uint16_t z;
-}TS_StateTypeDef;
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_TS_Exported_Constants STM322xG EVAL TS Exported Constants
- * @{
- */
-#define TS_SWAP_NONE 0x00
-#define TS_SWAP_X 0x01
-#define TS_SWAP_Y 0x02
-#define TS_SWAP_XY 0x04
-
-typedef enum
-{
- TS_OK = 0x00,
- TS_ERROR = 0x01,
- TS_TIMEOUT = 0x02
-}TS_StatusTypeDef;
-/**
- * @}
- */
-
-/** @defgroup STM322xG_EVAL_TS_Exported_Functions STM322xG EVAL TS Exported Functions
- * @{
- */
-uint8_t BSP_TS_Init(uint16_t xSize, uint16_t ySize);
-uint8_t BSP_TS_GetState(TS_StateTypeDef *TS_State);
-uint8_t BSP_TS_ITConfig(void);
-uint8_t BSP_TS_ITGetStatus(void);
-void BSP_TS_ITClear(void);
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __STM322xG_EVAL_TS_H */
-
diff --git a/Drivers/BSP/STM32F2xx_Nucleo_144 b/Drivers/BSP/STM32F2xx_Nucleo_144
new file mode 160000
index 00000000..b56fdfb0
--- /dev/null
+++ b/Drivers/BSP/STM32F2xx_Nucleo_144
@@ -0,0 +1 @@
+Subproject commit b56fdfb04649324fee1d5b5bc9b14aafa1992084
diff --git a/Drivers/BSP/STM32F2xx_Nucleo_144/LICENSE.md b/Drivers/BSP/STM32F2xx_Nucleo_144/LICENSE.md
deleted file mode 100644
index e94b88c3..00000000
--- a/Drivers/BSP/STM32F2xx_Nucleo_144/LICENSE.md
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright 2017 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.
\ No newline at end of file
diff --git a/Drivers/BSP/STM32F2xx_Nucleo_144/README.md b/Drivers/BSP/STM32F2xx_Nucleo_144/README.md
deleted file mode 100644
index 5e7249fc..00000000
--- a/Drivers/BSP/STM32F2xx_Nucleo_144/README.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# BSP STM32F2xx_Nucleo_144 Component
-
-
-
-## Overview
-
-**STM32Cube** is an STMicroelectronics original initiative to ease developers' life by reducing efforts, time and cost.
-
-**STM32Cube** covers the overall STM32 products portfolio. It includes a comprehensive embedded software platform delivered for each STM32 series.
- * The CMSIS modules (core and device) corresponding to the ARM(tm) core implemented in this STM32 product.
- * The STM32 HAL-LL drivers, an abstraction layer offering a set of APIs ensuring maximized portability across the STM32 portfolio.
- * The BSP drivers of each evaluation, demonstration or nucleo board provided for this STM32 series.
- * A consistent set of middleware libraries such as RTOS, USB, FatFS, graphics, touch sensing library...
- * A full set of software projects (basic examples, applications, and demonstrations) for each board provided for this STM32 series.
-
-Two models of publication are proposed for the STM32Cube embedded software:
- * The monolithic **MCU Package**: all STM32Cube software modules of one STM32 series are present (Drivers, Middleware, Projects, Utilities) in the repository (usual name **STM32Cubexx**, xx corresponding to the STM32 series).
- * The **MCU component**: each STM32Cube software module being part of the STM32Cube MCU Package, is delivered as an individual repository, allowing the user to select and get only the required software functions.
-
-## Description
-
-This **stm32f2xx-nucleo-144** MCU component repository is one element of the **STM32CubeF2** MCU embedded software package, providing the **STM32F2xx_Nucleo_144** BSP BOARD component part.
-
-## Release note
-
-Details about the content of this release are available in the release note [here](https://htmlpreview.github.io/?https://github.com/STMicroelectronics/stm32f2xx-nucleo-144/blob/main/Release_Notes.html).
-
-## Compatibility information
-
-Below is the list of the BSP *component* drivers to be used with this BSP *board* driver. It is **crucial** that you use a consistent set of CMSIS - HAL - BSP versions, as mentioned in [this](https://htmlpreview.github.io/?https://github.com/STMicroelectronics/STM32CubeF2/blob/master/Release_Notes.html) release note.
-
-* [stm32-bsp-common](https://github.com/STMicroelectronics/stm32-bsp-common)
-
-## Troubleshooting
-
-Please refer to the [CONTRIBUTING.md](CONTRIBUTING.md) guide.
diff --git a/Drivers/BSP/STM32F2xx_Nucleo_144/Release_Notes.html b/Drivers/BSP/STM32F2xx_Nucleo_144/Release_Notes.html
deleted file mode 100644
index e75deb4c..00000000
--- a/Drivers/BSP/STM32F2xx_Nucleo_144/Release_Notes.html
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
-
-
-
- Release Notes for STM32F2xx_Nucleo_144 Board Drivers
-
-
-
-
-
-
-
-
-
-
Release Notes for STM32F2xx_Nucleo_144 Board Drivers