mirror of
https://github.com/khoih-prog/AsyncHTTPRequest_Generic.git
synced 2025-07-30 02:17:14 +02:00
Update Packages' Patches
This commit is contained in:
@ -1,18 +1,18 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file stm32f4xx_hal_conf_default.h
|
||||
* @brief HAL default configuration file.
|
||||
@file stm32f4xx_hal_conf_default.h
|
||||
@brief HAL default configuration file.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
@attention
|
||||
|
||||
<h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
All rights reserved.</center></h2>
|
||||
|
||||
This software component is licensed by ST under BSD 3-Clause license,
|
||||
the "License"; You may not use this file except in compliance with the
|
||||
License. You may obtain a copy of the License at:
|
||||
opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
@ -29,13 +29,13 @@ extern "C" {
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief Include the default list of modules to be used in the HAL driver
|
||||
* and manage module deactivation
|
||||
@brief Include the default list of modules to be used in the HAL driver
|
||||
and manage module deactivation
|
||||
*/
|
||||
#include "stm32yyxx_hal_conf.h"
|
||||
#if 0
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
@brief This is the list of modules to be used in the HAL driver
|
||||
*/
|
||||
#define HAL_MODULE_ENABLED
|
||||
#define HAL_ADC_MODULE_ENABLED
|
||||
@ -90,9 +90,9 @@ extern "C" {
|
||||
|
||||
/* ########################## HSE/HSI Values adaptation ##################### */
|
||||
/**
|
||||
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSE is used as system clock source, directly or through the PLL).
|
||||
@brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
This value is used by the RCC HAL module to compute the system frequency
|
||||
(when HSE is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSE_VALUE)
|
||||
#define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */
|
||||
@ -103,16 +103,16 @@ extern "C" {
|
||||
#endif /* HSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief Internal High Speed oscillator (HSI) value.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSI is used as system clock source, directly or through the PLL).
|
||||
@brief Internal High Speed oscillator (HSI) value.
|
||||
This value is used by the RCC HAL module to compute the system frequency
|
||||
(when HSI is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSI_VALUE)
|
||||
#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz */
|
||||
#endif /* HSI_VALUE */
|
||||
|
||||
/**
|
||||
* @brief Internal Low Speed oscillator (LSI) value.
|
||||
@brief Internal Low Speed oscillator (LSI) value.
|
||||
*/
|
||||
#if !defined (LSI_VALUE)
|
||||
#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz */
|
||||
@ -120,7 +120,7 @@ extern "C" {
|
||||
The real value may vary depending on the variations
|
||||
in voltage and temperature. */
|
||||
/**
|
||||
* @brief External Low Speed oscillator (LSE) value.
|
||||
@brief External Low Speed oscillator (LSE) value.
|
||||
*/
|
||||
#if !defined (LSE_VALUE)
|
||||
#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */
|
||||
@ -131,9 +131,9 @@ in voltage and temperature. */
|
||||
#endif /* LSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief External clock source for I2S peripheral
|
||||
* This value is used by the I2S HAL module to compute the I2S clock source
|
||||
* frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
@brief External clock source for I2S peripheral
|
||||
This value is used by the I2S HAL module to compute the I2S clock source
|
||||
frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
*/
|
||||
#if !defined (EXTERNAL_CLOCK_VALUE)
|
||||
#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External oscillator in Hz*/
|
||||
@ -144,7 +144,7 @@ in voltage and temperature. */
|
||||
|
||||
/* ########################### System Configuration ######################### */
|
||||
/**
|
||||
* @brief This is the HAL system configuration section
|
||||
@brief This is the HAL system configuration section
|
||||
*/
|
||||
#if !defined (VDD_VALUE)
|
||||
#define VDD_VALUE 3300U /*!< Value of VDD in mv */
|
||||
@ -206,8 +206,8 @@ in voltage and temperature. */
|
||||
|
||||
/* ########################## Assert Selection ############################## */
|
||||
/**
|
||||
* @brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
* HAL drivers code
|
||||
@brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
HAL drivers code
|
||||
*/
|
||||
/* #define USE_FULL_ASSERT 1U */
|
||||
|
||||
@ -282,8 +282,8 @@ in voltage and temperature. */
|
||||
/* ################## SPI peripheral configuration ########################## */
|
||||
|
||||
/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
|
||||
* Activated: CRC code is present inside driver
|
||||
* Deactivated: CRC code cleaned from driver
|
||||
Activated: CRC code is present inside driver
|
||||
Deactivated: CRC code cleaned from driver
|
||||
*/
|
||||
#if !defined (USE_SPI_CRC)
|
||||
#define USE_SPI_CRC 0U
|
||||
@ -291,7 +291,7 @@ in voltage and temperature. */
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
/**
|
||||
* @brief Include module's header file
|
||||
@brief Include module's header file
|
||||
*/
|
||||
|
||||
#ifdef HAL_RCC_MODULE_ENABLED
|
||||
@ -489,12 +489,12 @@ in voltage and temperature. */
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
#ifdef USE_FULL_ASSERT
|
||||
/**
|
||||
* @brief The assert_param macro is used for function's parameters check.
|
||||
* @param expr If expr is false, it calls assert_failed function
|
||||
* which reports the name of the source file and the source
|
||||
* line number of the call that failed.
|
||||
* If expr is true, it returns no value.
|
||||
* @retval None
|
||||
@brief The assert_param macro is used for function's parameters check.
|
||||
@param expr If expr is false, it calls assert_failed function
|
||||
which reports the name of the source file and the source
|
||||
line number of the call that failed.
|
||||
If expr is true, it returns no value.
|
||||
@retval None
|
||||
*/
|
||||
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
|
@ -1,18 +1,18 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file stm32f7xx_hal_conf_default.h
|
||||
* @brief HAL default configuration file.
|
||||
@file stm32f7xx_hal_conf_default.h
|
||||
@brief HAL default configuration file.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
@attention
|
||||
|
||||
<h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
All rights reserved.</center></h2>
|
||||
|
||||
This software component is licensed by ST under BSD 3-Clause license,
|
||||
the "License"; You may not use this file except in compliance with the
|
||||
License. You may obtain a copy of the License at:
|
||||
opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
@ -29,13 +29,13 @@ extern "C" {
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief Include the default list of modules to be used in the HAL driver
|
||||
* and manage module deactivation
|
||||
@brief Include the default list of modules to be used in the HAL driver
|
||||
and manage module deactivation
|
||||
*/
|
||||
#include "stm32yyxx_hal_conf.h"
|
||||
#if 0
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
@brief This is the list of modules to be used in the HAL driver
|
||||
*/
|
||||
#define HAL_MODULE_ENABLED
|
||||
#define HAL_ADC_MODULE_ENABLED
|
||||
@ -90,9 +90,9 @@ extern "C" {
|
||||
|
||||
/* ########################## HSE/HSI Values adaptation ##################### */
|
||||
/**
|
||||
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSE is used as system clock source, directly or through the PLL).
|
||||
@brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
This value is used by the RCC HAL module to compute the system frequency
|
||||
(when HSE is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSE_VALUE)
|
||||
#define HSE_VALUE 25000000U /*!< Value of the External oscillator in Hz */
|
||||
@ -103,16 +103,16 @@ extern "C" {
|
||||
#endif /* HSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief Internal High Speed oscillator (HSI) value.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSI is used as system clock source, directly or through the PLL).
|
||||
@brief Internal High Speed oscillator (HSI) value.
|
||||
This value is used by the RCC HAL module to compute the system frequency
|
||||
(when HSI is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSI_VALUE)
|
||||
#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/
|
||||
#endif /* HSI_VALUE */
|
||||
|
||||
/**
|
||||
* @brief Internal Low Speed oscillator (LSI) value.
|
||||
@brief Internal Low Speed oscillator (LSI) value.
|
||||
*/
|
||||
#if !defined (LSI_VALUE)
|
||||
#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/
|
||||
@ -120,7 +120,7 @@ extern "C" {
|
||||
The real value may vary depending on the variations
|
||||
in voltage and temperature. */
|
||||
/**
|
||||
* @brief External Low Speed oscillator (LSE) value.
|
||||
@brief External Low Speed oscillator (LSE) value.
|
||||
*/
|
||||
#if !defined (LSE_VALUE)
|
||||
#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */
|
||||
@ -131,9 +131,9 @@ in voltage and temperature. */
|
||||
#endif /* LSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief External clock source for I2S peripheral
|
||||
* This value is used by the I2S HAL module to compute the I2S clock source
|
||||
* frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
@brief External clock source for I2S peripheral
|
||||
This value is used by the I2S HAL module to compute the I2S clock source
|
||||
frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
*/
|
||||
#if !defined (EXTERNAL_CLOCK_VALUE)
|
||||
#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the Internal oscillator in Hz*/
|
||||
@ -144,7 +144,7 @@ in voltage and temperature. */
|
||||
|
||||
/* ########################### System Configuration ######################### */
|
||||
/**
|
||||
* @brief This is the HAL system configuration section
|
||||
@brief This is the HAL system configuration section
|
||||
*/
|
||||
#if !defined (VDD_VALUE)
|
||||
#define VDD_VALUE 3300U /*!< Value of VDD in mv */
|
||||
@ -203,8 +203,8 @@ in voltage and temperature. */
|
||||
|
||||
/* ########################## Assert Selection ############################## */
|
||||
/**
|
||||
* @brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
* HAL drivers code
|
||||
@brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
HAL drivers code
|
||||
*/
|
||||
/* #define USE_FULL_ASSERT 1 */
|
||||
|
||||
@ -279,8 +279,8 @@ in voltage and temperature. */
|
||||
/* ################## SPI peripheral configuration ########################## */
|
||||
|
||||
/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
|
||||
* Activated: CRC code is present inside driver
|
||||
* Deactivated: CRC code cleaned from driver
|
||||
Activated: CRC code is present inside driver
|
||||
Deactivated: CRC code cleaned from driver
|
||||
*/
|
||||
#if !defined (USE_SPI_CRC)
|
||||
#define USE_SPI_CRC 0U
|
||||
@ -288,7 +288,7 @@ in voltage and temperature. */
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
/**
|
||||
* @brief Include module's header file
|
||||
@brief Include module's header file
|
||||
*/
|
||||
|
||||
#ifdef HAL_RCC_MODULE_ENABLED
|
||||
@ -486,12 +486,12 @@ in voltage and temperature. */
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
#ifdef USE_FULL_ASSERT
|
||||
/**
|
||||
* @brief The assert_param macro is used for function's parameters check.
|
||||
* @param expr If expr is false, it calls assert_failed function
|
||||
* which reports the name of the source file and the source
|
||||
* line number of the call that failed.
|
||||
* If expr is true, it returns no value.
|
||||
* @retval None
|
||||
@brief The assert_param macro is used for function's parameters check.
|
||||
@param expr If expr is false, it calls assert_failed function
|
||||
which reports the name of the source file and the source
|
||||
line number of the call that failed.
|
||||
If expr is true, it returns no value.
|
||||
@retval None
|
||||
*/
|
||||
#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
|
@ -24,8 +24,8 @@ extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Pins
|
||||
*----------------------------------------------------------------------------*/
|
||||
Pins
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#define PG9 0
|
||||
#define PG14 1
|
||||
@ -156,8 +156,8 @@ extern "C" {
|
||||
} // extern "C"
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
Arduino objects - C++ only
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
// These serial port names are intended to allow libraries and architecture-neutral
|
||||
|
@ -24,8 +24,8 @@ extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Pins
|
||||
*----------------------------------------------------------------------------*/
|
||||
Pins
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#define PA3 0
|
||||
#define PA2 1
|
||||
@ -116,8 +116,8 @@ extern "C" {
|
||||
} // extern "C"
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
Arduino objects - C++ only
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
// These serial port names are intended to allow libraries and architecture-neutral
|
||||
|
@ -1,18 +1,18 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file stm32f4xx_hal_conf_default.h
|
||||
* @brief HAL default configuration file.
|
||||
@file stm32f4xx_hal_conf_default.h
|
||||
@brief HAL default configuration file.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
@attention
|
||||
|
||||
<h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
All rights reserved.</center></h2>
|
||||
|
||||
This software component is licensed by ST under BSD 3-Clause license,
|
||||
the "License"; You may not use this file except in compliance with the
|
||||
License. You may obtain a copy of the License at:
|
||||
opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
@ -29,13 +29,13 @@ extern "C" {
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief Include the default list of modules to be used in the HAL driver
|
||||
* and manage module deactivation
|
||||
@brief Include the default list of modules to be used in the HAL driver
|
||||
and manage module deactivation
|
||||
*/
|
||||
#include "stm32yyxx_hal_conf.h"
|
||||
#if 0
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
@brief This is the list of modules to be used in the HAL driver
|
||||
*/
|
||||
#define HAL_MODULE_ENABLED
|
||||
#define HAL_ADC_MODULE_ENABLED
|
||||
@ -91,9 +91,9 @@ extern "C" {
|
||||
|
||||
/* ########################## HSE/HSI Values adaptation ##################### */
|
||||
/**
|
||||
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSE is used as system clock source, directly or through the PLL).
|
||||
@brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
This value is used by the RCC HAL module to compute the system frequency
|
||||
(when HSE is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSE_VALUE)
|
||||
#define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */
|
||||
@ -104,16 +104,16 @@ extern "C" {
|
||||
#endif /* HSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief Internal High Speed oscillator (HSI) value.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSI is used as system clock source, directly or through the PLL).
|
||||
@brief Internal High Speed oscillator (HSI) value.
|
||||
This value is used by the RCC HAL module to compute the system frequency
|
||||
(when HSI is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSI_VALUE)
|
||||
#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz */
|
||||
#endif /* HSI_VALUE */
|
||||
|
||||
/**
|
||||
* @brief Internal Low Speed oscillator (LSI) value.
|
||||
@brief Internal Low Speed oscillator (LSI) value.
|
||||
*/
|
||||
#if !defined (LSI_VALUE)
|
||||
#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz */
|
||||
@ -121,7 +121,7 @@ extern "C" {
|
||||
The real value may vary depending on the variations
|
||||
in voltage and temperature. */
|
||||
/**
|
||||
* @brief External Low Speed oscillator (LSE) value.
|
||||
@brief External Low Speed oscillator (LSE) value.
|
||||
*/
|
||||
#if !defined (LSE_VALUE)
|
||||
#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */
|
||||
@ -132,9 +132,9 @@ in voltage and temperature. */
|
||||
#endif /* LSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief External clock source for I2S peripheral
|
||||
* This value is used by the I2S HAL module to compute the I2S clock source
|
||||
* frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
@brief External clock source for I2S peripheral
|
||||
This value is used by the I2S HAL module to compute the I2S clock source
|
||||
frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
*/
|
||||
#if !defined (EXTERNAL_CLOCK_VALUE)
|
||||
#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External oscillator in Hz*/
|
||||
@ -145,7 +145,7 @@ in voltage and temperature. */
|
||||
|
||||
/* ########################### System Configuration ######################### */
|
||||
/**
|
||||
* @brief This is the HAL system configuration section
|
||||
@brief This is the HAL system configuration section
|
||||
*/
|
||||
#if !defined (VDD_VALUE)
|
||||
#define VDD_VALUE 3300U /*!< Value of VDD in mv */
|
||||
@ -208,8 +208,8 @@ in voltage and temperature. */
|
||||
|
||||
/* ########################## Assert Selection ############################## */
|
||||
/**
|
||||
* @brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
* HAL drivers code
|
||||
@brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
HAL drivers code
|
||||
*/
|
||||
/* #define USE_FULL_ASSERT 1U */
|
||||
|
||||
@ -284,8 +284,8 @@ in voltage and temperature. */
|
||||
/* ################## SPI peripheral configuration ########################## */
|
||||
|
||||
/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
|
||||
* Activated: CRC code is present inside driver
|
||||
* Deactivated: CRC code cleaned from driver
|
||||
Activated: CRC code is present inside driver
|
||||
Deactivated: CRC code cleaned from driver
|
||||
*/
|
||||
#if !defined (USE_SPI_CRC)
|
||||
#define USE_SPI_CRC 0U
|
||||
@ -293,7 +293,7 @@ in voltage and temperature. */
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
/**
|
||||
* @brief Include module's header file
|
||||
@brief Include module's header file
|
||||
*/
|
||||
|
||||
#ifdef HAL_RCC_MODULE_ENABLED
|
||||
@ -495,12 +495,12 @@ in voltage and temperature. */
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
#ifdef USE_FULL_ASSERT
|
||||
/**
|
||||
* @brief The assert_param macro is used for function's parameters check.
|
||||
* @param expr If expr is false, it calls assert_failed function
|
||||
* which reports the name of the source file and the source
|
||||
* line number of the call that failed.
|
||||
* If expr is true, it returns no value.
|
||||
* @retval None
|
||||
@brief The assert_param macro is used for function's parameters check.
|
||||
@param expr If expr is false, it calls assert_failed function
|
||||
which reports the name of the source file and the source
|
||||
line number of the call that failed.
|
||||
If expr is true, it returns no value.
|
||||
@retval None
|
||||
*/
|
||||
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
|
@ -1,18 +1,18 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file stm32f7xx_hal_conf_default.h
|
||||
* @brief HAL default configuration file.
|
||||
@file stm32f7xx_hal_conf_default.h
|
||||
@brief HAL default configuration file.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
@attention
|
||||
|
||||
<h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
All rights reserved.</center></h2>
|
||||
|
||||
This software component is licensed by ST under BSD 3-Clause license,
|
||||
the "License"; You may not use this file except in compliance with the
|
||||
License. You may obtain a copy of the License at:
|
||||
opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
@ -29,13 +29,13 @@ extern "C" {
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief Include the default list of modules to be used in the HAL driver
|
||||
* and manage module deactivation
|
||||
@brief Include the default list of modules to be used in the HAL driver
|
||||
and manage module deactivation
|
||||
*/
|
||||
#include "stm32yyxx_hal_conf.h"
|
||||
#if 0
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
@brief This is the list of modules to be used in the HAL driver
|
||||
*/
|
||||
#define HAL_MODULE_ENABLED
|
||||
#define HAL_ADC_MODULE_ENABLED
|
||||
@ -90,9 +90,9 @@ extern "C" {
|
||||
|
||||
/* ########################## HSE/HSI Values adaptation ##################### */
|
||||
/**
|
||||
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSE is used as system clock source, directly or through the PLL).
|
||||
@brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
This value is used by the RCC HAL module to compute the system frequency
|
||||
(when HSE is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSE_VALUE)
|
||||
#define HSE_VALUE 25000000U /*!< Value of the External oscillator in Hz */
|
||||
@ -103,16 +103,16 @@ extern "C" {
|
||||
#endif /* HSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief Internal High Speed oscillator (HSI) value.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSI is used as system clock source, directly or through the PLL).
|
||||
@brief Internal High Speed oscillator (HSI) value.
|
||||
This value is used by the RCC HAL module to compute the system frequency
|
||||
(when HSI is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSI_VALUE)
|
||||
#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/
|
||||
#endif /* HSI_VALUE */
|
||||
|
||||
/**
|
||||
* @brief Internal Low Speed oscillator (LSI) value.
|
||||
@brief Internal Low Speed oscillator (LSI) value.
|
||||
*/
|
||||
#if !defined (LSI_VALUE)
|
||||
#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/
|
||||
@ -120,7 +120,7 @@ extern "C" {
|
||||
The real value may vary depending on the variations
|
||||
in voltage and temperature. */
|
||||
/**
|
||||
* @brief External Low Speed oscillator (LSE) value.
|
||||
@brief External Low Speed oscillator (LSE) value.
|
||||
*/
|
||||
#if !defined (LSE_VALUE)
|
||||
#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */
|
||||
@ -131,9 +131,9 @@ in voltage and temperature. */
|
||||
#endif /* LSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief External clock source for I2S peripheral
|
||||
* This value is used by the I2S HAL module to compute the I2S clock source
|
||||
* frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
@brief External clock source for I2S peripheral
|
||||
This value is used by the I2S HAL module to compute the I2S clock source
|
||||
frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
*/
|
||||
#if !defined (EXTERNAL_CLOCK_VALUE)
|
||||
#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the Internal oscillator in Hz*/
|
||||
@ -144,7 +144,7 @@ in voltage and temperature. */
|
||||
|
||||
/* ########################### System Configuration ######################### */
|
||||
/**
|
||||
* @brief This is the HAL system configuration section
|
||||
@brief This is the HAL system configuration section
|
||||
*/
|
||||
#if !defined (VDD_VALUE)
|
||||
#define VDD_VALUE 3300U /*!< Value of VDD in mv */
|
||||
@ -203,8 +203,8 @@ in voltage and temperature. */
|
||||
|
||||
/* ########################## Assert Selection ############################## */
|
||||
/**
|
||||
* @brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
* HAL drivers code
|
||||
@brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
HAL drivers code
|
||||
*/
|
||||
/* #define USE_FULL_ASSERT 1 */
|
||||
|
||||
@ -279,8 +279,8 @@ in voltage and temperature. */
|
||||
/* ################## SPI peripheral configuration ########################## */
|
||||
|
||||
/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
|
||||
* Activated: CRC code is present inside driver
|
||||
* Deactivated: CRC code cleaned from driver
|
||||
Activated: CRC code is present inside driver
|
||||
Deactivated: CRC code cleaned from driver
|
||||
*/
|
||||
#if !defined (USE_SPI_CRC)
|
||||
#define USE_SPI_CRC 0U
|
||||
@ -288,7 +288,7 @@ in voltage and temperature. */
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
/**
|
||||
* @brief Include module's header file
|
||||
@brief Include module's header file
|
||||
*/
|
||||
|
||||
#ifdef HAL_RCC_MODULE_ENABLED
|
||||
@ -486,12 +486,12 @@ in voltage and temperature. */
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
#ifdef USE_FULL_ASSERT
|
||||
/**
|
||||
* @brief The assert_param macro is used for function's parameters check.
|
||||
* @param expr If expr is false, it calls assert_failed function
|
||||
* which reports the name of the source file and the source
|
||||
* line number of the call that failed.
|
||||
* If expr is true, it returns no value.
|
||||
* @retval None
|
||||
@brief The assert_param macro is used for function's parameters check.
|
||||
@param expr If expr is false, it calls assert_failed function
|
||||
which reports the name of the source file and the source
|
||||
line number of the call that failed.
|
||||
If expr is true, it returns no value.
|
||||
@retval None
|
||||
*/
|
||||
#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
|
@ -1,20 +1,20 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (c) 2020-2021, STMicroelectronics
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
Copyright (c) 2020-2021, STMicroelectronics
|
||||
All rights reserved.
|
||||
|
||||
This software component is licensed by ST under BSD 3-Clause license,
|
||||
the "License"; You may not use this file except in compliance with the
|
||||
License. You may obtain a copy of the License at:
|
||||
opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
*******************************************************************************
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Pins
|
||||
*----------------------------------------------------------------------------*/
|
||||
Pins
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#define PG9 0
|
||||
#define PG14 1
|
||||
@ -244,8 +244,8 @@
|
||||
#define FLASH_DATA_SECTOR 11
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
Arduino objects - C++ only
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
// These serial port names are intended to allow libraries and architecture-neutral
|
||||
|
@ -1,20 +1,20 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (c) 2020-2021, STMicroelectronics
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
Copyright (c) 2020-2021, STMicroelectronics
|
||||
All rights reserved.
|
||||
|
||||
This software component is licensed by ST under BSD 3-Clause license,
|
||||
the "License"; You may not use this file except in compliance with the
|
||||
License. You may obtain a copy of the License at:
|
||||
opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
*******************************************************************************
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* STM32 pins number
|
||||
*----------------------------------------------------------------------------*/
|
||||
STM32 pins number
|
||||
----------------------------------------------------------------------------*/
|
||||
#define PA0 PIN_A0
|
||||
#define PA1 PIN_A1
|
||||
#define PA2 PIN_A2
|
||||
@ -143,8 +143,8 @@
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
Arduino objects - C++ only
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
// These serial port names are intended to allow libraries and architecture-neutral
|
||||
|
@ -1,20 +1,20 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (c) 2020-2021, STMicroelectronics
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
Copyright (c) 2020-2021, STMicroelectronics
|
||||
All rights reserved.
|
||||
|
||||
This software component is licensed by ST under BSD 3-Clause license,
|
||||
the "License"; You may not use this file except in compliance with the
|
||||
License. You may obtain a copy of the License at:
|
||||
opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
*******************************************************************************
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Pins
|
||||
*----------------------------------------------------------------------------*/
|
||||
Pins
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#define PG9 0
|
||||
#define PG14 1
|
||||
@ -244,8 +244,8 @@
|
||||
#define FLASH_DATA_SECTOR 11
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
Arduino objects - C++ only
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
// These serial port names are intended to allow libraries and architecture-neutral
|
||||
|
@ -1,20 +1,20 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (c) 2020-2021, STMicroelectronics
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
Copyright (c) 2020-2021, STMicroelectronics
|
||||
All rights reserved.
|
||||
|
||||
This software component is licensed by ST under BSD 3-Clause license,
|
||||
the "License"; You may not use this file except in compliance with the
|
||||
License. You may obtain a copy of the License at:
|
||||
opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
*******************************************************************************
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* STM32 pins number
|
||||
*----------------------------------------------------------------------------*/
|
||||
STM32 pins number
|
||||
----------------------------------------------------------------------------*/
|
||||
#define PA0 PIN_A0
|
||||
#define PA1 PIN_A1
|
||||
#define PA2 PIN_A2
|
||||
@ -143,8 +143,8 @@
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
Arduino objects - C++ only
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
// These serial port names are intended to allow libraries and architecture-neutral
|
||||
|
@ -1,18 +1,18 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file stm32f4xx_hal_conf_default.h
|
||||
* @brief HAL default configuration file.
|
||||
@file stm32f4xx_hal_conf_default.h
|
||||
@brief HAL default configuration file.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
@attention
|
||||
|
||||
<h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
All rights reserved.</center></h2>
|
||||
|
||||
This software component is licensed by ST under BSD 3-Clause license,
|
||||
the "License"; You may not use this file except in compliance with the
|
||||
License. You may obtain a copy of the License at:
|
||||
opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
@ -29,13 +29,13 @@ extern "C" {
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief Include the default list of modules to be used in the HAL driver
|
||||
* and manage module deactivation
|
||||
@brief Include the default list of modules to be used in the HAL driver
|
||||
and manage module deactivation
|
||||
*/
|
||||
#include "stm32yyxx_hal_conf.h"
|
||||
#if 0
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
@brief This is the list of modules to be used in the HAL driver
|
||||
*/
|
||||
#define HAL_MODULE_ENABLED
|
||||
#define HAL_ADC_MODULE_ENABLED
|
||||
@ -91,9 +91,9 @@ extern "C" {
|
||||
|
||||
/* ########################## HSE/HSI Values adaptation ##################### */
|
||||
/**
|
||||
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSE is used as system clock source, directly or through the PLL).
|
||||
@brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
This value is used by the RCC HAL module to compute the system frequency
|
||||
(when HSE is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSE_VALUE)
|
||||
#define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */
|
||||
@ -104,16 +104,16 @@ extern "C" {
|
||||
#endif /* HSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief Internal High Speed oscillator (HSI) value.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSI is used as system clock source, directly or through the PLL).
|
||||
@brief Internal High Speed oscillator (HSI) value.
|
||||
This value is used by the RCC HAL module to compute the system frequency
|
||||
(when HSI is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSI_VALUE)
|
||||
#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz */
|
||||
#endif /* HSI_VALUE */
|
||||
|
||||
/**
|
||||
* @brief Internal Low Speed oscillator (LSI) value.
|
||||
@brief Internal Low Speed oscillator (LSI) value.
|
||||
*/
|
||||
#if !defined (LSI_VALUE)
|
||||
#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz */
|
||||
@ -121,7 +121,7 @@ extern "C" {
|
||||
The real value may vary depending on the variations
|
||||
in voltage and temperature. */
|
||||
/**
|
||||
* @brief External Low Speed oscillator (LSE) value.
|
||||
@brief External Low Speed oscillator (LSE) value.
|
||||
*/
|
||||
#if !defined (LSE_VALUE)
|
||||
#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */
|
||||
@ -132,9 +132,9 @@ in voltage and temperature. */
|
||||
#endif /* LSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief External clock source for I2S peripheral
|
||||
* This value is used by the I2S HAL module to compute the I2S clock source
|
||||
* frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
@brief External clock source for I2S peripheral
|
||||
This value is used by the I2S HAL module to compute the I2S clock source
|
||||
frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
*/
|
||||
#if !defined (EXTERNAL_CLOCK_VALUE)
|
||||
#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External oscillator in Hz*/
|
||||
@ -145,7 +145,7 @@ in voltage and temperature. */
|
||||
|
||||
/* ########################### System Configuration ######################### */
|
||||
/**
|
||||
* @brief This is the HAL system configuration section
|
||||
@brief This is the HAL system configuration section
|
||||
*/
|
||||
#if !defined (VDD_VALUE)
|
||||
#define VDD_VALUE 3300U /*!< Value of VDD in mv */
|
||||
@ -208,8 +208,8 @@ in voltage and temperature. */
|
||||
|
||||
/* ########################## Assert Selection ############################## */
|
||||
/**
|
||||
* @brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
* HAL drivers code
|
||||
@brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
HAL drivers code
|
||||
*/
|
||||
/* #define USE_FULL_ASSERT 1U */
|
||||
|
||||
@ -284,8 +284,8 @@ in voltage and temperature. */
|
||||
/* ################## SPI peripheral configuration ########################## */
|
||||
|
||||
/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
|
||||
* Activated: CRC code is present inside driver
|
||||
* Deactivated: CRC code cleaned from driver
|
||||
Activated: CRC code is present inside driver
|
||||
Deactivated: CRC code cleaned from driver
|
||||
*/
|
||||
#if !defined (USE_SPI_CRC)
|
||||
#define USE_SPI_CRC 0U
|
||||
@ -293,7 +293,7 @@ in voltage and temperature. */
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
/**
|
||||
* @brief Include module's header file
|
||||
@brief Include module's header file
|
||||
*/
|
||||
|
||||
#ifdef HAL_RCC_MODULE_ENABLED
|
||||
@ -495,12 +495,12 @@ in voltage and temperature. */
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
#ifdef USE_FULL_ASSERT
|
||||
/**
|
||||
* @brief The assert_param macro is used for function's parameters check.
|
||||
* @param expr If expr is false, it calls assert_failed function
|
||||
* which reports the name of the source file and the source
|
||||
* line number of the call that failed.
|
||||
* If expr is true, it returns no value.
|
||||
* @retval None
|
||||
@brief The assert_param macro is used for function's parameters check.
|
||||
@param expr If expr is false, it calls assert_failed function
|
||||
which reports the name of the source file and the source
|
||||
line number of the call that failed.
|
||||
If expr is true, it returns no value.
|
||||
@retval None
|
||||
*/
|
||||
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
|
@ -1,18 +1,18 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file stm32f7xx_hal_conf_default.h
|
||||
* @brief HAL default configuration file.
|
||||
@file stm32f7xx_hal_conf_default.h
|
||||
@brief HAL default configuration file.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
@attention
|
||||
|
||||
<h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
All rights reserved.</center></h2>
|
||||
|
||||
This software component is licensed by ST under BSD 3-Clause license,
|
||||
the "License"; You may not use this file except in compliance with the
|
||||
License. You may obtain a copy of the License at:
|
||||
opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
@ -29,13 +29,13 @@ extern "C" {
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief Include the default list of modules to be used in the HAL driver
|
||||
* and manage module deactivation
|
||||
@brief Include the default list of modules to be used in the HAL driver
|
||||
and manage module deactivation
|
||||
*/
|
||||
#include "stm32yyxx_hal_conf.h"
|
||||
#if 0
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
@brief This is the list of modules to be used in the HAL driver
|
||||
*/
|
||||
#define HAL_MODULE_ENABLED
|
||||
#define HAL_ADC_MODULE_ENABLED
|
||||
@ -90,9 +90,9 @@ extern "C" {
|
||||
|
||||
/* ########################## HSE/HSI Values adaptation ##################### */
|
||||
/**
|
||||
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSE is used as system clock source, directly or through the PLL).
|
||||
@brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
This value is used by the RCC HAL module to compute the system frequency
|
||||
(when HSE is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSE_VALUE)
|
||||
#define HSE_VALUE 25000000U /*!< Value of the External oscillator in Hz */
|
||||
@ -103,16 +103,16 @@ extern "C" {
|
||||
#endif /* HSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief Internal High Speed oscillator (HSI) value.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSI is used as system clock source, directly or through the PLL).
|
||||
@brief Internal High Speed oscillator (HSI) value.
|
||||
This value is used by the RCC HAL module to compute the system frequency
|
||||
(when HSI is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSI_VALUE)
|
||||
#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/
|
||||
#endif /* HSI_VALUE */
|
||||
|
||||
/**
|
||||
* @brief Internal Low Speed oscillator (LSI) value.
|
||||
@brief Internal Low Speed oscillator (LSI) value.
|
||||
*/
|
||||
#if !defined (LSI_VALUE)
|
||||
#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/
|
||||
@ -120,7 +120,7 @@ extern "C" {
|
||||
The real value may vary depending on the variations
|
||||
in voltage and temperature. */
|
||||
/**
|
||||
* @brief External Low Speed oscillator (LSE) value.
|
||||
@brief External Low Speed oscillator (LSE) value.
|
||||
*/
|
||||
#if !defined (LSE_VALUE)
|
||||
#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */
|
||||
@ -131,9 +131,9 @@ in voltage and temperature. */
|
||||
#endif /* LSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief External clock source for I2S peripheral
|
||||
* This value is used by the I2S HAL module to compute the I2S clock source
|
||||
* frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
@brief External clock source for I2S peripheral
|
||||
This value is used by the I2S HAL module to compute the I2S clock source
|
||||
frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
*/
|
||||
#if !defined (EXTERNAL_CLOCK_VALUE)
|
||||
#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the Internal oscillator in Hz*/
|
||||
@ -144,7 +144,7 @@ in voltage and temperature. */
|
||||
|
||||
/* ########################### System Configuration ######################### */
|
||||
/**
|
||||
* @brief This is the HAL system configuration section
|
||||
@brief This is the HAL system configuration section
|
||||
*/
|
||||
#if !defined (VDD_VALUE)
|
||||
#define VDD_VALUE 3300U /*!< Value of VDD in mv */
|
||||
@ -203,8 +203,8 @@ in voltage and temperature. */
|
||||
|
||||
/* ########################## Assert Selection ############################## */
|
||||
/**
|
||||
* @brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
* HAL drivers code
|
||||
@brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
HAL drivers code
|
||||
*/
|
||||
/* #define USE_FULL_ASSERT 1 */
|
||||
|
||||
@ -279,8 +279,8 @@ in voltage and temperature. */
|
||||
/* ################## SPI peripheral configuration ########################## */
|
||||
|
||||
/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
|
||||
* Activated: CRC code is present inside driver
|
||||
* Deactivated: CRC code cleaned from driver
|
||||
Activated: CRC code is present inside driver
|
||||
Deactivated: CRC code cleaned from driver
|
||||
*/
|
||||
#if !defined (USE_SPI_CRC)
|
||||
#define USE_SPI_CRC 0U
|
||||
@ -288,7 +288,7 @@ in voltage and temperature. */
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
/**
|
||||
* @brief Include module's header file
|
||||
@brief Include module's header file
|
||||
*/
|
||||
|
||||
#ifdef HAL_RCC_MODULE_ENABLED
|
||||
@ -486,12 +486,12 @@ in voltage and temperature. */
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
#ifdef USE_FULL_ASSERT
|
||||
/**
|
||||
* @brief The assert_param macro is used for function's parameters check.
|
||||
* @param expr If expr is false, it calls assert_failed function
|
||||
* which reports the name of the source file and the source
|
||||
* line number of the call that failed.
|
||||
* If expr is true, it returns no value.
|
||||
* @retval None
|
||||
@brief The assert_param macro is used for function's parameters check.
|
||||
@param expr If expr is false, it calls assert_failed function
|
||||
which reports the name of the source file and the source
|
||||
line number of the call that failed.
|
||||
If expr is true, it returns no value.
|
||||
@retval None
|
||||
*/
|
||||
#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
|
@ -1,20 +1,20 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (c) 2020-2021, STMicroelectronics
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
Copyright (c) 2020-2021, STMicroelectronics
|
||||
All rights reserved.
|
||||
|
||||
This software component is licensed by ST under BSD 3-Clause license,
|
||||
the "License"; You may not use this file except in compliance with the
|
||||
License. You may obtain a copy of the License at:
|
||||
opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
*******************************************************************************
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Pins
|
||||
*----------------------------------------------------------------------------*/
|
||||
Pins
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#define PG9 0
|
||||
#define PG14 1
|
||||
@ -244,8 +244,8 @@
|
||||
#define FLASH_DATA_SECTOR 11
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
Arduino objects - C++ only
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
// These serial port names are intended to allow libraries and architecture-neutral
|
||||
|
@ -1,20 +1,20 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (c) 2020-2021, STMicroelectronics
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
Copyright (c) 2020-2021, STMicroelectronics
|
||||
All rights reserved.
|
||||
|
||||
This software component is licensed by ST under BSD 3-Clause license,
|
||||
the "License"; You may not use this file except in compliance with the
|
||||
License. You may obtain a copy of the License at:
|
||||
opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
*******************************************************************************
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* STM32 pins number
|
||||
*----------------------------------------------------------------------------*/
|
||||
STM32 pins number
|
||||
----------------------------------------------------------------------------*/
|
||||
#define PA0 PIN_A0
|
||||
#define PA1 PIN_A1
|
||||
#define PA2 PIN_A2
|
||||
@ -143,8 +143,8 @@
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
Arduino objects - C++ only
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
// These serial port names are intended to allow libraries and architecture-neutral
|
||||
|
@ -1,18 +1,18 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file stm32f4xx_hal_conf_default.h
|
||||
* @brief HAL default configuration file.
|
||||
@file stm32f4xx_hal_conf_default.h
|
||||
@brief HAL default configuration file.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
@attention
|
||||
|
||||
<h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
All rights reserved.</center></h2>
|
||||
|
||||
This software component is licensed by ST under BSD 3-Clause license,
|
||||
the "License"; You may not use this file except in compliance with the
|
||||
License. You may obtain a copy of the License at:
|
||||
opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
@ -29,13 +29,13 @@ extern "C" {
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief Include the default list of modules to be used in the HAL driver
|
||||
* and manage module deactivation
|
||||
@brief Include the default list of modules to be used in the HAL driver
|
||||
and manage module deactivation
|
||||
*/
|
||||
#include "stm32yyxx_hal_conf.h"
|
||||
#if 0
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
@brief This is the list of modules to be used in the HAL driver
|
||||
*/
|
||||
#define HAL_MODULE_ENABLED
|
||||
#define HAL_ADC_MODULE_ENABLED
|
||||
@ -91,9 +91,9 @@ extern "C" {
|
||||
|
||||
/* ########################## HSE/HSI Values adaptation ##################### */
|
||||
/**
|
||||
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSE is used as system clock source, directly or through the PLL).
|
||||
@brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
This value is used by the RCC HAL module to compute the system frequency
|
||||
(when HSE is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSE_VALUE)
|
||||
#define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */
|
||||
@ -104,16 +104,16 @@ extern "C" {
|
||||
#endif /* HSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief Internal High Speed oscillator (HSI) value.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSI is used as system clock source, directly or through the PLL).
|
||||
@brief Internal High Speed oscillator (HSI) value.
|
||||
This value is used by the RCC HAL module to compute the system frequency
|
||||
(when HSI is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSI_VALUE)
|
||||
#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz */
|
||||
#endif /* HSI_VALUE */
|
||||
|
||||
/**
|
||||
* @brief Internal Low Speed oscillator (LSI) value.
|
||||
@brief Internal Low Speed oscillator (LSI) value.
|
||||
*/
|
||||
#if !defined (LSI_VALUE)
|
||||
#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz */
|
||||
@ -121,7 +121,7 @@ extern "C" {
|
||||
The real value may vary depending on the variations
|
||||
in voltage and temperature. */
|
||||
/**
|
||||
* @brief External Low Speed oscillator (LSE) value.
|
||||
@brief External Low Speed oscillator (LSE) value.
|
||||
*/
|
||||
#if !defined (LSE_VALUE)
|
||||
#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */
|
||||
@ -132,9 +132,9 @@ in voltage and temperature. */
|
||||
#endif /* LSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief External clock source for I2S peripheral
|
||||
* This value is used by the I2S HAL module to compute the I2S clock source
|
||||
* frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
@brief External clock source for I2S peripheral
|
||||
This value is used by the I2S HAL module to compute the I2S clock source
|
||||
frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
*/
|
||||
#if !defined (EXTERNAL_CLOCK_VALUE)
|
||||
#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External oscillator in Hz*/
|
||||
@ -145,7 +145,7 @@ in voltage and temperature. */
|
||||
|
||||
/* ########################### System Configuration ######################### */
|
||||
/**
|
||||
* @brief This is the HAL system configuration section
|
||||
@brief This is the HAL system configuration section
|
||||
*/
|
||||
#if !defined (VDD_VALUE)
|
||||
#define VDD_VALUE 3300U /*!< Value of VDD in mv */
|
||||
@ -208,8 +208,8 @@ in voltage and temperature. */
|
||||
|
||||
/* ########################## Assert Selection ############################## */
|
||||
/**
|
||||
* @brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
* HAL drivers code
|
||||
@brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
HAL drivers code
|
||||
*/
|
||||
/* #define USE_FULL_ASSERT 1U */
|
||||
|
||||
@ -284,8 +284,8 @@ in voltage and temperature. */
|
||||
/* ################## SPI peripheral configuration ########################## */
|
||||
|
||||
/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
|
||||
* Activated: CRC code is present inside driver
|
||||
* Deactivated: CRC code cleaned from driver
|
||||
Activated: CRC code is present inside driver
|
||||
Deactivated: CRC code cleaned from driver
|
||||
*/
|
||||
#if !defined (USE_SPI_CRC)
|
||||
#define USE_SPI_CRC 0U
|
||||
@ -293,7 +293,7 @@ in voltage and temperature. */
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
/**
|
||||
* @brief Include module's header file
|
||||
@brief Include module's header file
|
||||
*/
|
||||
|
||||
#ifdef HAL_RCC_MODULE_ENABLED
|
||||
@ -495,12 +495,12 @@ in voltage and temperature. */
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
#ifdef USE_FULL_ASSERT
|
||||
/**
|
||||
* @brief The assert_param macro is used for function's parameters check.
|
||||
* @param expr If expr is false, it calls assert_failed function
|
||||
* which reports the name of the source file and the source
|
||||
* line number of the call that failed.
|
||||
* If expr is true, it returns no value.
|
||||
* @retval None
|
||||
@brief The assert_param macro is used for function's parameters check.
|
||||
@param expr If expr is false, it calls assert_failed function
|
||||
which reports the name of the source file and the source
|
||||
line number of the call that failed.
|
||||
If expr is true, it returns no value.
|
||||
@retval None
|
||||
*/
|
||||
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
|
@ -1,18 +1,18 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file stm32f7xx_hal_conf_default.h
|
||||
* @brief HAL default configuration file.
|
||||
@file stm32f7xx_hal_conf_default.h
|
||||
@brief HAL default configuration file.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
@attention
|
||||
|
||||
<h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
All rights reserved.</center></h2>
|
||||
|
||||
This software component is licensed by ST under BSD 3-Clause license,
|
||||
the "License"; You may not use this file except in compliance with the
|
||||
License. You may obtain a copy of the License at:
|
||||
opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
@ -29,13 +29,13 @@ extern "C" {
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief Include the default list of modules to be used in the HAL driver
|
||||
* and manage module deactivation
|
||||
@brief Include the default list of modules to be used in the HAL driver
|
||||
and manage module deactivation
|
||||
*/
|
||||
#include "stm32yyxx_hal_conf.h"
|
||||
#if 0
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
@brief This is the list of modules to be used in the HAL driver
|
||||
*/
|
||||
#define HAL_MODULE_ENABLED
|
||||
#define HAL_ADC_MODULE_ENABLED
|
||||
@ -90,9 +90,9 @@ extern "C" {
|
||||
|
||||
/* ########################## HSE/HSI Values adaptation ##################### */
|
||||
/**
|
||||
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSE is used as system clock source, directly or through the PLL).
|
||||
@brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
This value is used by the RCC HAL module to compute the system frequency
|
||||
(when HSE is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSE_VALUE)
|
||||
#define HSE_VALUE 25000000U /*!< Value of the External oscillator in Hz */
|
||||
@ -103,16 +103,16 @@ extern "C" {
|
||||
#endif /* HSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief Internal High Speed oscillator (HSI) value.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSI is used as system clock source, directly or through the PLL).
|
||||
@brief Internal High Speed oscillator (HSI) value.
|
||||
This value is used by the RCC HAL module to compute the system frequency
|
||||
(when HSI is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSI_VALUE)
|
||||
#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/
|
||||
#endif /* HSI_VALUE */
|
||||
|
||||
/**
|
||||
* @brief Internal Low Speed oscillator (LSI) value.
|
||||
@brief Internal Low Speed oscillator (LSI) value.
|
||||
*/
|
||||
#if !defined (LSI_VALUE)
|
||||
#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/
|
||||
@ -120,7 +120,7 @@ extern "C" {
|
||||
The real value may vary depending on the variations
|
||||
in voltage and temperature. */
|
||||
/**
|
||||
* @brief External Low Speed oscillator (LSE) value.
|
||||
@brief External Low Speed oscillator (LSE) value.
|
||||
*/
|
||||
#if !defined (LSE_VALUE)
|
||||
#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */
|
||||
@ -131,9 +131,9 @@ in voltage and temperature. */
|
||||
#endif /* LSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief External clock source for I2S peripheral
|
||||
* This value is used by the I2S HAL module to compute the I2S clock source
|
||||
* frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
@brief External clock source for I2S peripheral
|
||||
This value is used by the I2S HAL module to compute the I2S clock source
|
||||
frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
*/
|
||||
#if !defined (EXTERNAL_CLOCK_VALUE)
|
||||
#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the Internal oscillator in Hz*/
|
||||
@ -144,7 +144,7 @@ in voltage and temperature. */
|
||||
|
||||
/* ########################### System Configuration ######################### */
|
||||
/**
|
||||
* @brief This is the HAL system configuration section
|
||||
@brief This is the HAL system configuration section
|
||||
*/
|
||||
#if !defined (VDD_VALUE)
|
||||
#define VDD_VALUE 3300U /*!< Value of VDD in mv */
|
||||
@ -203,8 +203,8 @@ in voltage and temperature. */
|
||||
|
||||
/* ########################## Assert Selection ############################## */
|
||||
/**
|
||||
* @brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
* HAL drivers code
|
||||
@brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
HAL drivers code
|
||||
*/
|
||||
/* #define USE_FULL_ASSERT 1 */
|
||||
|
||||
@ -279,8 +279,8 @@ in voltage and temperature. */
|
||||
/* ################## SPI peripheral configuration ########################## */
|
||||
|
||||
/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
|
||||
* Activated: CRC code is present inside driver
|
||||
* Deactivated: CRC code cleaned from driver
|
||||
Activated: CRC code is present inside driver
|
||||
Deactivated: CRC code cleaned from driver
|
||||
*/
|
||||
#if !defined (USE_SPI_CRC)
|
||||
#define USE_SPI_CRC 0U
|
||||
@ -288,7 +288,7 @@ in voltage and temperature. */
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
/**
|
||||
* @brief Include module's header file
|
||||
@brief Include module's header file
|
||||
*/
|
||||
|
||||
#ifdef HAL_RCC_MODULE_ENABLED
|
||||
@ -486,12 +486,12 @@ in voltage and temperature. */
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
#ifdef USE_FULL_ASSERT
|
||||
/**
|
||||
* @brief The assert_param macro is used for function's parameters check.
|
||||
* @param expr If expr is false, it calls assert_failed function
|
||||
* which reports the name of the source file and the source
|
||||
* line number of the call that failed.
|
||||
* If expr is true, it returns no value.
|
||||
* @retval None
|
||||
@brief The assert_param macro is used for function's parameters check.
|
||||
@param expr If expr is false, it calls assert_failed function
|
||||
which reports the name of the source file and the source
|
||||
line number of the call that failed.
|
||||
If expr is true, it returns no value.
|
||||
@retval None
|
||||
*/
|
||||
#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
|
@ -1,20 +1,20 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (c) 2020-2021, STMicroelectronics
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
Copyright (c) 2020-2021, STMicroelectronics
|
||||
All rights reserved.
|
||||
|
||||
This software component is licensed by ST under BSD 3-Clause license,
|
||||
the "License"; You may not use this file except in compliance with the
|
||||
License. You may obtain a copy of the License at:
|
||||
opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
*******************************************************************************
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Pins
|
||||
*----------------------------------------------------------------------------*/
|
||||
Pins
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#define PG9 0
|
||||
#define PG14 1
|
||||
@ -244,8 +244,8 @@
|
||||
#define FLASH_DATA_SECTOR 11
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
Arduino objects - C++ only
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
// These serial port names are intended to allow libraries and architecture-neutral
|
||||
|
@ -1,20 +1,20 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (c) 2020-2021, STMicroelectronics
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
Copyright (c) 2020-2021, STMicroelectronics
|
||||
All rights reserved.
|
||||
|
||||
This software component is licensed by ST under BSD 3-Clause license,
|
||||
the "License"; You may not use this file except in compliance with the
|
||||
License. You may obtain a copy of the License at:
|
||||
opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
*******************************************************************************
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* STM32 pins number
|
||||
*----------------------------------------------------------------------------*/
|
||||
STM32 pins number
|
||||
----------------------------------------------------------------------------*/
|
||||
#define PA0 PIN_A0
|
||||
#define PA1 PIN_A1
|
||||
#define PA2 PIN_A2
|
||||
@ -143,8 +143,8 @@
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
Arduino objects - C++ only
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
// These serial port names are intended to allow libraries and architecture-neutral
|
||||
|
@ -1,18 +1,18 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file stm32f4xx_hal_conf_default.h
|
||||
* @brief HAL default configuration file.
|
||||
@file stm32f4xx_hal_conf_default.h
|
||||
@brief HAL default configuration file.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
@attention
|
||||
|
||||
<h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
All rights reserved.</center></h2>
|
||||
|
||||
This software component is licensed by ST under BSD 3-Clause license,
|
||||
the "License"; You may not use this file except in compliance with the
|
||||
License. You may obtain a copy of the License at:
|
||||
opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
@ -29,13 +29,13 @@ extern "C" {
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief Include the default list of modules to be used in the HAL driver
|
||||
* and manage module deactivation
|
||||
@brief Include the default list of modules to be used in the HAL driver
|
||||
and manage module deactivation
|
||||
*/
|
||||
#include "stm32yyxx_hal_conf.h"
|
||||
#if 0
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
@brief This is the list of modules to be used in the HAL driver
|
||||
*/
|
||||
#define HAL_MODULE_ENABLED
|
||||
#define HAL_ADC_MODULE_ENABLED
|
||||
@ -92,9 +92,9 @@ extern "C" {
|
||||
|
||||
/* ########################## HSE/HSI Values adaptation ##################### */
|
||||
/**
|
||||
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSE is used as system clock source, directly or through the PLL).
|
||||
@brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
This value is used by the RCC HAL module to compute the system frequency
|
||||
(when HSE is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSE_VALUE)
|
||||
#define HSE_VALUE 8000000U /*!< Value of the External oscillator in Hz */
|
||||
@ -105,16 +105,16 @@ extern "C" {
|
||||
#endif /* HSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief Internal High Speed oscillator (HSI) value.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSI is used as system clock source, directly or through the PLL).
|
||||
@brief Internal High Speed oscillator (HSI) value.
|
||||
This value is used by the RCC HAL module to compute the system frequency
|
||||
(when HSI is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSI_VALUE)
|
||||
#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz */
|
||||
#endif /* HSI_VALUE */
|
||||
|
||||
/**
|
||||
* @brief Internal Low Speed oscillator (LSI) value.
|
||||
@brief Internal Low Speed oscillator (LSI) value.
|
||||
*/
|
||||
#if !defined (LSI_VALUE)
|
||||
#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz */
|
||||
@ -122,7 +122,7 @@ extern "C" {
|
||||
The real value may vary depending on the variations
|
||||
in voltage and temperature. */
|
||||
/**
|
||||
* @brief External Low Speed oscillator (LSE) value.
|
||||
@brief External Low Speed oscillator (LSE) value.
|
||||
*/
|
||||
#if !defined (LSE_VALUE)
|
||||
#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */
|
||||
@ -133,9 +133,9 @@ in voltage and temperature. */
|
||||
#endif /* LSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief External clock source for I2S peripheral
|
||||
* This value is used by the I2S HAL module to compute the I2S clock source
|
||||
* frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
@brief External clock source for I2S peripheral
|
||||
This value is used by the I2S HAL module to compute the I2S clock source
|
||||
frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
*/
|
||||
#if !defined (EXTERNAL_CLOCK_VALUE)
|
||||
#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External oscillator in Hz*/
|
||||
@ -146,7 +146,7 @@ in voltage and temperature. */
|
||||
|
||||
/* ########################### System Configuration ######################### */
|
||||
/**
|
||||
* @brief This is the HAL system configuration section
|
||||
@brief This is the HAL system configuration section
|
||||
*/
|
||||
#if !defined (VDD_VALUE)
|
||||
#define VDD_VALUE 3300U /*!< Value of VDD in mv */
|
||||
@ -209,8 +209,8 @@ in voltage and temperature. */
|
||||
|
||||
/* ########################## Assert Selection ############################## */
|
||||
/**
|
||||
* @brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
* HAL drivers code
|
||||
@brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
HAL drivers code
|
||||
*/
|
||||
/* #define USE_FULL_ASSERT 1U */
|
||||
|
||||
@ -285,8 +285,8 @@ in voltage and temperature. */
|
||||
/* ################## SPI peripheral configuration ########################## */
|
||||
|
||||
/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
|
||||
* Activated: CRC code is present inside driver
|
||||
* Deactivated: CRC code cleaned from driver
|
||||
Activated: CRC code is present inside driver
|
||||
Deactivated: CRC code cleaned from driver
|
||||
*/
|
||||
#if !defined (USE_SPI_CRC)
|
||||
#define USE_SPI_CRC 0U
|
||||
@ -294,7 +294,7 @@ in voltage and temperature. */
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
/**
|
||||
* @brief Include module's header file
|
||||
@brief Include module's header file
|
||||
*/
|
||||
|
||||
#ifdef HAL_RCC_MODULE_ENABLED
|
||||
@ -500,12 +500,12 @@ in voltage and temperature. */
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
#ifdef USE_FULL_ASSERT
|
||||
/**
|
||||
* @brief The assert_param macro is used for function's parameters check.
|
||||
* @param expr If expr is false, it calls assert_failed function
|
||||
* which reports the name of the source file and the source
|
||||
* line number of the call that failed.
|
||||
* If expr is true, it returns no value.
|
||||
* @retval None
|
||||
@brief The assert_param macro is used for function's parameters check.
|
||||
@param expr If expr is false, it calls assert_failed function
|
||||
which reports the name of the source file and the source
|
||||
line number of the call that failed.
|
||||
If expr is true, it returns no value.
|
||||
@retval None
|
||||
*/
|
||||
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
|
@ -1,17 +1,17 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file stm32f7xx_hal_conf_default.h
|
||||
* @brief HAL default configuration file.
|
||||
@file stm32f7xx_hal_conf_default.h
|
||||
@brief HAL default configuration file.
|
||||
******************************************************************************
|
||||
* @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.
|
||||
*
|
||||
@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.
|
||||
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
@ -28,13 +28,13 @@ extern "C" {
|
||||
|
||||
/* ########################## Module Selection ############################## */
|
||||
/**
|
||||
* @brief Include the default list of modules to be used in the HAL driver
|
||||
* and manage module deactivation
|
||||
@brief Include the default list of modules to be used in the HAL driver
|
||||
and manage module deactivation
|
||||
*/
|
||||
#include "stm32yyxx_hal_conf.h"
|
||||
#if 0
|
||||
/**
|
||||
* @brief This is the list of modules to be used in the HAL driver
|
||||
@brief This is the list of modules to be used in the HAL driver
|
||||
*/
|
||||
#define HAL_MODULE_ENABLED
|
||||
#define HAL_ADC_MODULE_ENABLED
|
||||
@ -89,9 +89,9 @@ extern "C" {
|
||||
|
||||
/* ########################## HSE/HSI Values adaptation ##################### */
|
||||
/**
|
||||
* @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSE is used as system clock source, directly or through the PLL).
|
||||
@brief Adjust the value of External High Speed oscillator (HSE) used in your application.
|
||||
This value is used by the RCC HAL module to compute the system frequency
|
||||
(when HSE is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSE_VALUE)
|
||||
#define HSE_VALUE 25000000U /*!< Value of the External oscillator in Hz */
|
||||
@ -102,16 +102,16 @@ extern "C" {
|
||||
#endif /* HSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief Internal High Speed oscillator (HSI) value.
|
||||
* This value is used by the RCC HAL module to compute the system frequency
|
||||
* (when HSI is used as system clock source, directly or through the PLL).
|
||||
@brief Internal High Speed oscillator (HSI) value.
|
||||
This value is used by the RCC HAL module to compute the system frequency
|
||||
(when HSI is used as system clock source, directly or through the PLL).
|
||||
*/
|
||||
#if !defined (HSI_VALUE)
|
||||
#define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz*/
|
||||
#endif /* HSI_VALUE */
|
||||
|
||||
/**
|
||||
* @brief Internal Low Speed oscillator (LSI) value.
|
||||
@brief Internal Low Speed oscillator (LSI) value.
|
||||
*/
|
||||
#if !defined (LSI_VALUE)
|
||||
#define LSI_VALUE 32000U /*!< LSI Typical Value in Hz*/
|
||||
@ -119,7 +119,7 @@ extern "C" {
|
||||
The real value may vary depending on the variations
|
||||
in voltage and temperature. */
|
||||
/**
|
||||
* @brief External Low Speed oscillator (LSE) value.
|
||||
@brief External Low Speed oscillator (LSE) value.
|
||||
*/
|
||||
#if !defined (LSE_VALUE)
|
||||
#define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */
|
||||
@ -130,9 +130,9 @@ in voltage and temperature. */
|
||||
#endif /* LSE_STARTUP_TIMEOUT */
|
||||
|
||||
/**
|
||||
* @brief External clock source for I2S peripheral
|
||||
* This value is used by the I2S HAL module to compute the I2S clock source
|
||||
* frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
@brief External clock source for I2S peripheral
|
||||
This value is used by the I2S HAL module to compute the I2S clock source
|
||||
frequency, this source is inserted directly through I2S_CKIN pad.
|
||||
*/
|
||||
#if !defined (EXTERNAL_CLOCK_VALUE)
|
||||
#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the Internal oscillator in Hz*/
|
||||
@ -143,7 +143,7 @@ in voltage and temperature. */
|
||||
|
||||
/* ########################### System Configuration ######################### */
|
||||
/**
|
||||
* @brief This is the HAL system configuration section
|
||||
@brief This is the HAL system configuration section
|
||||
*/
|
||||
#if !defined (VDD_VALUE)
|
||||
#define VDD_VALUE 3300U /*!< Value of VDD in mv */
|
||||
@ -202,8 +202,8 @@ in voltage and temperature. */
|
||||
|
||||
/* ########################## Assert Selection ############################## */
|
||||
/**
|
||||
* @brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
* HAL drivers code
|
||||
@brief Uncomment the line below to expanse the "assert_param" macro in the
|
||||
HAL drivers code
|
||||
*/
|
||||
/* #define USE_FULL_ASSERT 1 */
|
||||
|
||||
@ -278,8 +278,8 @@ in voltage and temperature. */
|
||||
/* ################## SPI peripheral configuration ########################## */
|
||||
|
||||
/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
|
||||
* Activated: CRC code is present inside driver
|
||||
* Deactivated: CRC code cleaned from driver
|
||||
Activated: CRC code is present inside driver
|
||||
Deactivated: CRC code cleaned from driver
|
||||
*/
|
||||
#if !defined (USE_SPI_CRC)
|
||||
#define USE_SPI_CRC 0U
|
||||
@ -287,7 +287,7 @@ in voltage and temperature. */
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
/**
|
||||
* @brief Include module's header file
|
||||
@brief Include module's header file
|
||||
*/
|
||||
|
||||
#ifdef HAL_RCC_MODULE_ENABLED
|
||||
@ -485,12 +485,12 @@ in voltage and temperature. */
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
#ifdef USE_FULL_ASSERT
|
||||
/**
|
||||
* @brief The assert_param macro is used for function's parameters check.
|
||||
* @param expr If expr is false, it calls assert_failed function
|
||||
* which reports the name of the source file and the source
|
||||
* line number of the call that failed.
|
||||
* If expr is true, it returns no value.
|
||||
* @retval None
|
||||
@brief The assert_param macro is used for function's parameters check.
|
||||
@param expr If expr is false, it calls assert_failed function
|
||||
which reports the name of the source file and the source
|
||||
line number of the call that failed.
|
||||
If expr is true, it returns no value.
|
||||
@retval None
|
||||
*/
|
||||
#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
|
@ -1,20 +1,20 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (c) 2020-2021, STMicroelectronics
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
Copyright (c) 2020-2021, STMicroelectronics
|
||||
All rights reserved.
|
||||
|
||||
This software component is licensed by ST under BSD 3-Clause license,
|
||||
the "License"; You may not use this file except in compliance with the
|
||||
License. You may obtain a copy of the License at:
|
||||
opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
*******************************************************************************
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Pins
|
||||
*----------------------------------------------------------------------------*/
|
||||
Pins
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#define PG9 0
|
||||
#define PG14 1
|
||||
@ -244,8 +244,8 @@
|
||||
#define FLASH_DATA_SECTOR 11
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
Arduino objects - C++ only
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
// These serial port names are intended to allow libraries and architecture-neutral
|
||||
|
@ -1,20 +1,20 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (c) 2020-2021, STMicroelectronics
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
Copyright (c) 2020-2021, STMicroelectronics
|
||||
All rights reserved.
|
||||
|
||||
This software component is licensed by ST under BSD 3-Clause license,
|
||||
the "License"; You may not use this file except in compliance with the
|
||||
License. You may obtain a copy of the License at:
|
||||
opensource.org/licenses/BSD-3-Clause
|
||||
|
||||
*******************************************************************************
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* STM32 pins number
|
||||
*----------------------------------------------------------------------------*/
|
||||
STM32 pins number
|
||||
----------------------------------------------------------------------------*/
|
||||
#define PA0 PIN_A0
|
||||
#define PA1 PIN_A1
|
||||
#define PA2 PIN_A2
|
||||
@ -143,8 +143,8 @@
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Arduino objects - C++ only
|
||||
*----------------------------------------------------------------------------*/
|
||||
Arduino objects - C++ only
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
// These serial port names are intended to allow libraries and architecture-neutral
|
||||
|
@ -36,10 +36,15 @@
|
||||
size_t Print::write(const uint8_t *buffer, size_t size)
|
||||
{
|
||||
size_t n = 0;
|
||||
while (size--) {
|
||||
if (write(*buffer++)) n++;
|
||||
else break;
|
||||
|
||||
while (size--)
|
||||
{
|
||||
if (write(*buffer++))
|
||||
n++;
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
@ -80,46 +85,64 @@ size_t Print::print(unsigned int n, int base)
|
||||
|
||||
size_t Print::print(long n, int base)
|
||||
{
|
||||
if (base == 0) {
|
||||
if (base == 0)
|
||||
{
|
||||
return write(n);
|
||||
} else if (base == 10) {
|
||||
if (n < 0) {
|
||||
}
|
||||
else if (base == 10)
|
||||
{
|
||||
if (n < 0)
|
||||
{
|
||||
int t = print('-');
|
||||
n = -n;
|
||||
return printNumber(n, 10) + t;
|
||||
}
|
||||
|
||||
return printNumber(n, 10);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
return printNumber(n, base);
|
||||
}
|
||||
}
|
||||
|
||||
size_t Print::print(unsigned long n, int base)
|
||||
{
|
||||
if (base == 0) return write(n);
|
||||
else return printNumber(n, base);
|
||||
if (base == 0)
|
||||
return write(n);
|
||||
else
|
||||
return printNumber(n, base);
|
||||
}
|
||||
|
||||
size_t Print::print(long long n, int base)
|
||||
{
|
||||
if (base == 0) {
|
||||
if (base == 0)
|
||||
{
|
||||
return write(n);
|
||||
} else if (base == 10) {
|
||||
if (n < 0) {
|
||||
}
|
||||
else if (base == 10)
|
||||
{
|
||||
if (n < 0)
|
||||
{
|
||||
int t = print('-');
|
||||
n = -n;
|
||||
return printULLNumber(n, 10) + t;
|
||||
}
|
||||
|
||||
return printULLNumber(n, 10);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
return printULLNumber(n, base);
|
||||
}
|
||||
}
|
||||
|
||||
size_t Print::print(unsigned long long n, int base)
|
||||
{
|
||||
if (base == 0) return write(n);
|
||||
else return printULLNumber(n, base);
|
||||
if (base == 0)
|
||||
return write(n);
|
||||
else
|
||||
return printULLNumber(n, base);
|
||||
}
|
||||
|
||||
size_t Print::print(double n, int digits)
|
||||
@ -253,9 +276,11 @@ size_t Print::printNumber(unsigned long n, uint8_t base)
|
||||
*str = '\0';
|
||||
|
||||
// prevent crash if called with base == 1
|
||||
if (base < 2) base = 10;
|
||||
if (base < 2)
|
||||
base = 10;
|
||||
|
||||
do {
|
||||
do
|
||||
{
|
||||
char c = n % base;
|
||||
n /= base;
|
||||
|
||||
@ -296,11 +321,13 @@ size_t Print::printULLNumber(unsigned long long n64, uint8_t base)
|
||||
uint8_t innerLoops = 0;
|
||||
|
||||
// prevent crash if called with base == 1
|
||||
if (base < 2) base = 10;
|
||||
if (base < 2)
|
||||
base = 10;
|
||||
|
||||
// process chunks that fit in "16 bit math".
|
||||
uint16_t top = 0xFFFF / base;
|
||||
uint16_t th16 = 1;
|
||||
|
||||
while (th16 < top)
|
||||
{
|
||||
th16 *= base;
|
||||
@ -324,6 +351,7 @@ size_t Print::printULLNumber(unsigned long long n64, uint8_t base)
|
||||
}
|
||||
|
||||
uint16_t n16 = n64;
|
||||
|
||||
while (n16 > 0)
|
||||
{
|
||||
uint16_t qq = n16 / base;
|
||||
@ -332,6 +360,7 @@ size_t Print::printULLNumber(unsigned long long n64, uint8_t base)
|
||||
}
|
||||
|
||||
size_t bytes = i;
|
||||
|
||||
for (; i > 0; i--)
|
||||
write((char) (buf[i - 1] < 10 ?
|
||||
'0' + buf[i - 1] :
|
||||
@ -347,10 +376,17 @@ size_t Print::printFloat(double number, int digits)
|
||||
|
||||
size_t n = 0;
|
||||
|
||||
if (isnan(number)) return print("nan");
|
||||
if (isinf(number)) return print("inf");
|
||||
if (number > 4294967040.0) return print ("ovf"); // constant determined empirically
|
||||
if (number <-4294967040.0) return print ("ovf"); // constant determined empirically
|
||||
if (isnan(number))
|
||||
return print("nan");
|
||||
|
||||
if (isinf(number))
|
||||
return print("inf");
|
||||
|
||||
if (number > 4294967040.0)
|
||||
return print ("ovf"); // constant determined empirically
|
||||
|
||||
if (number < -4294967040.0)
|
||||
return print ("ovf"); // constant determined empirically
|
||||
|
||||
// Handle negative numbers
|
||||
if (number < 0.0)
|
||||
@ -361,6 +397,7 @@ size_t Print::printFloat(double number, int digits)
|
||||
|
||||
// Round correctly so that print(1.999, 2) prints as "2.00"
|
||||
double rounding = 0.5;
|
||||
|
||||
for (uint8_t i = 0; i < digits; ++i)
|
||||
rounding /= 10.0;
|
||||
|
||||
@ -372,7 +409,8 @@ size_t Print::printFloat(double number, int digits)
|
||||
n += print(int_part);
|
||||
|
||||
// Print the decimal point, but only if there are digits beyond
|
||||
if (digits > 0) {
|
||||
if (digits > 0)
|
||||
{
|
||||
n += print(".");
|
||||
}
|
||||
|
||||
@ -390,12 +428,16 @@ size_t Print::printFloat(double number, int digits)
|
||||
|
||||
size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline)
|
||||
{
|
||||
if (buffer == NULL || len == 0) return 0;
|
||||
if (buffer == NULL || len == 0)
|
||||
return 0;
|
||||
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
if ( i != 0 ) print(delim);
|
||||
if ( byteline && (i%byteline == 0) ) println();
|
||||
if ( i != 0 )
|
||||
print(delim);
|
||||
|
||||
if ( byteline && (i % byteline == 0) )
|
||||
println();
|
||||
|
||||
this->printf("%02X", buffer[i]);
|
||||
}
|
||||
@ -405,12 +447,16 @@ size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int bytel
|
||||
|
||||
size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline)
|
||||
{
|
||||
if (buffer == NULL || len == 0) return 0;
|
||||
if (buffer == NULL || len == 0)
|
||||
return 0;
|
||||
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
if (i != 0) print(delim);
|
||||
if ( byteline && (i%byteline == 0) ) println();
|
||||
if (i != 0)
|
||||
print(delim);
|
||||
|
||||
if ( byteline && (i % byteline == 0) )
|
||||
println();
|
||||
|
||||
this->printf("%02X", buffer[len - 1 - i]);
|
||||
}
|
||||
|
@ -37,26 +37,42 @@ class Print
|
||||
size_t printULLNumber(unsigned long long, uint8_t);
|
||||
size_t printFloat(double, int);
|
||||
protected:
|
||||
void setWriteError(int err = 1) { write_error = err; }
|
||||
void setWriteError(int err = 1)
|
||||
{
|
||||
write_error = err;
|
||||
}
|
||||
public:
|
||||
Print() : write_error(0) {}
|
||||
|
||||
int getWriteError() { return write_error; }
|
||||
void clearWriteError() { setWriteError(0); }
|
||||
int getWriteError()
|
||||
{
|
||||
return write_error;
|
||||
}
|
||||
void clearWriteError()
|
||||
{
|
||||
setWriteError(0);
|
||||
}
|
||||
|
||||
virtual size_t write(uint8_t) = 0;
|
||||
size_t write(const char *str) {
|
||||
if (str == NULL) return 0;
|
||||
size_t write(const char *str)
|
||||
{
|
||||
if (str == NULL)
|
||||
return 0;
|
||||
|
||||
return write((const uint8_t *)str, strlen(str));
|
||||
}
|
||||
virtual size_t write(const uint8_t *buffer, size_t size);
|
||||
size_t write(const char *buffer, size_t size) {
|
||||
size_t write(const char *buffer, size_t size)
|
||||
{
|
||||
return write((const uint8_t *)buffer, size);
|
||||
}
|
||||
|
||||
// default to zero, meaning "a single write may block"
|
||||
// should be overridden by subclasses with buffering
|
||||
virtual int availableForWrite() { return 0; }
|
||||
virtual int availableForWrite()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t print(const __FlashStringHelper *);
|
||||
size_t print(const String &);
|
||||
|
@ -36,10 +36,15 @@
|
||||
size_t Print::write(const uint8_t *buffer, size_t size)
|
||||
{
|
||||
size_t n = 0;
|
||||
while (size--) {
|
||||
if (write(*buffer++)) n++;
|
||||
else break;
|
||||
|
||||
while (size--)
|
||||
{
|
||||
if (write(*buffer++))
|
||||
n++;
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
@ -80,46 +85,64 @@ size_t Print::print(unsigned int n, int base)
|
||||
|
||||
size_t Print::print(long n, int base)
|
||||
{
|
||||
if (base == 0) {
|
||||
if (base == 0)
|
||||
{
|
||||
return write(n);
|
||||
} else if (base == 10) {
|
||||
if (n < 0) {
|
||||
}
|
||||
else if (base == 10)
|
||||
{
|
||||
if (n < 0)
|
||||
{
|
||||
int t = print('-');
|
||||
n = -n;
|
||||
return printNumber(n, 10) + t;
|
||||
}
|
||||
|
||||
return printNumber(n, 10);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
return printNumber(n, base);
|
||||
}
|
||||
}
|
||||
|
||||
size_t Print::print(unsigned long n, int base)
|
||||
{
|
||||
if (base == 0) return write(n);
|
||||
else return printNumber(n, base);
|
||||
if (base == 0)
|
||||
return write(n);
|
||||
else
|
||||
return printNumber(n, base);
|
||||
}
|
||||
|
||||
size_t Print::print(long long n, int base)
|
||||
{
|
||||
if (base == 0) {
|
||||
if (base == 0)
|
||||
{
|
||||
return write(n);
|
||||
} else if (base == 10) {
|
||||
if (n < 0) {
|
||||
}
|
||||
else if (base == 10)
|
||||
{
|
||||
if (n < 0)
|
||||
{
|
||||
int t = print('-');
|
||||
n = -n;
|
||||
return printULLNumber(n, 10) + t;
|
||||
}
|
||||
|
||||
return printULLNumber(n, 10);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
return printULLNumber(n, base);
|
||||
}
|
||||
}
|
||||
|
||||
size_t Print::print(unsigned long long n, int base)
|
||||
{
|
||||
if (base == 0) return write(n);
|
||||
else return printULLNumber(n, base);
|
||||
if (base == 0)
|
||||
return write(n);
|
||||
else
|
||||
return printULLNumber(n, base);
|
||||
}
|
||||
|
||||
size_t Print::print(double n, int digits)
|
||||
@ -253,9 +276,11 @@ size_t Print::printNumber(unsigned long n, uint8_t base)
|
||||
*str = '\0';
|
||||
|
||||
// prevent crash if called with base == 1
|
||||
if (base < 2) base = 10;
|
||||
if (base < 2)
|
||||
base = 10;
|
||||
|
||||
do {
|
||||
do
|
||||
{
|
||||
char c = n % base;
|
||||
n /= base;
|
||||
|
||||
@ -296,11 +321,13 @@ size_t Print::printULLNumber(unsigned long long n64, uint8_t base)
|
||||
uint8_t innerLoops = 0;
|
||||
|
||||
// prevent crash if called with base == 1
|
||||
if (base < 2) base = 10;
|
||||
if (base < 2)
|
||||
base = 10;
|
||||
|
||||
// process chunks that fit in "16 bit math".
|
||||
uint16_t top = 0xFFFF / base;
|
||||
uint16_t th16 = 1;
|
||||
|
||||
while (th16 < top)
|
||||
{
|
||||
th16 *= base;
|
||||
@ -324,6 +351,7 @@ size_t Print::printULLNumber(unsigned long long n64, uint8_t base)
|
||||
}
|
||||
|
||||
uint16_t n16 = n64;
|
||||
|
||||
while (n16 > 0)
|
||||
{
|
||||
uint16_t qq = n16 / base;
|
||||
@ -332,6 +360,7 @@ size_t Print::printULLNumber(unsigned long long n64, uint8_t base)
|
||||
}
|
||||
|
||||
size_t bytes = i;
|
||||
|
||||
for (; i > 0; i--)
|
||||
write((char) (buf[i - 1] < 10 ?
|
||||
'0' + buf[i - 1] :
|
||||
@ -347,10 +376,17 @@ size_t Print::printFloat(double number, int digits)
|
||||
|
||||
size_t n = 0;
|
||||
|
||||
if (isnan(number)) return print("nan");
|
||||
if (isinf(number)) return print("inf");
|
||||
if (number > 4294967040.0) return print ("ovf"); // constant determined empirically
|
||||
if (number <-4294967040.0) return print ("ovf"); // constant determined empirically
|
||||
if (isnan(number))
|
||||
return print("nan");
|
||||
|
||||
if (isinf(number))
|
||||
return print("inf");
|
||||
|
||||
if (number > 4294967040.0)
|
||||
return print ("ovf"); // constant determined empirically
|
||||
|
||||
if (number < -4294967040.0)
|
||||
return print ("ovf"); // constant determined empirically
|
||||
|
||||
// Handle negative numbers
|
||||
if (number < 0.0)
|
||||
@ -361,6 +397,7 @@ size_t Print::printFloat(double number, int digits)
|
||||
|
||||
// Round correctly so that print(1.999, 2) prints as "2.00"
|
||||
double rounding = 0.5;
|
||||
|
||||
for (uint8_t i = 0; i < digits; ++i)
|
||||
rounding /= 10.0;
|
||||
|
||||
@ -372,7 +409,8 @@ size_t Print::printFloat(double number, int digits)
|
||||
n += print(int_part);
|
||||
|
||||
// Print the decimal point, but only if there are digits beyond
|
||||
if (digits > 0) {
|
||||
if (digits > 0)
|
||||
{
|
||||
n += print(".");
|
||||
}
|
||||
|
||||
@ -390,12 +428,16 @@ size_t Print::printFloat(double number, int digits)
|
||||
|
||||
size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int byteline)
|
||||
{
|
||||
if (buffer == NULL || len == 0) return 0;
|
||||
if (buffer == NULL || len == 0)
|
||||
return 0;
|
||||
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
if ( i != 0 ) print(delim);
|
||||
if ( byteline && (i%byteline == 0) ) println();
|
||||
if ( i != 0 )
|
||||
print(delim);
|
||||
|
||||
if ( byteline && (i % byteline == 0) )
|
||||
println();
|
||||
|
||||
this->printf("%02X", buffer[i]);
|
||||
}
|
||||
@ -405,12 +447,16 @@ size_t Print::printBuffer(uint8_t const buffer[], int len, char delim, int bytel
|
||||
|
||||
size_t Print::printBufferReverse(uint8_t const buffer[], int len, char delim, int byteline)
|
||||
{
|
||||
if (buffer == NULL || len == 0) return 0;
|
||||
if (buffer == NULL || len == 0)
|
||||
return 0;
|
||||
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
if (i != 0) print(delim);
|
||||
if ( byteline && (i%byteline == 0) ) println();
|
||||
if (i != 0)
|
||||
print(delim);
|
||||
|
||||
if ( byteline && (i % byteline == 0) )
|
||||
println();
|
||||
|
||||
this->printf("%02X", buffer[len - 1 - i]);
|
||||
}
|
||||
|
@ -37,26 +37,42 @@ class Print
|
||||
size_t printULLNumber(unsigned long long, uint8_t);
|
||||
size_t printFloat(double, int);
|
||||
protected:
|
||||
void setWriteError(int err = 1) { write_error = err; }
|
||||
void setWriteError(int err = 1)
|
||||
{
|
||||
write_error = err;
|
||||
}
|
||||
public:
|
||||
Print() : write_error(0) {}
|
||||
|
||||
int getWriteError() { return write_error; }
|
||||
void clearWriteError() { setWriteError(0); }
|
||||
int getWriteError()
|
||||
{
|
||||
return write_error;
|
||||
}
|
||||
void clearWriteError()
|
||||
{
|
||||
setWriteError(0);
|
||||
}
|
||||
|
||||
virtual size_t write(uint8_t) = 0;
|
||||
size_t write(const char *str) {
|
||||
if (str == NULL) return 0;
|
||||
size_t write(const char *str)
|
||||
{
|
||||
if (str == NULL)
|
||||
return 0;
|
||||
|
||||
return write((const uint8_t *)str, strlen(str));
|
||||
}
|
||||
virtual size_t write(const uint8_t *buffer, size_t size);
|
||||
size_t write(const char *buffer, size_t size) {
|
||||
size_t write(const char *buffer, size_t size)
|
||||
{
|
||||
return write((const uint8_t *)buffer, size);
|
||||
}
|
||||
|
||||
// default to zero, meaning "a single write may block"
|
||||
// should be overridden by subclasses with buffering
|
||||
virtual int availableForWrite() { return 0; }
|
||||
virtual int availableForWrite()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t print(const __FlashStringHelper *);
|
||||
size_t print(const String &);
|
||||
|
Reference in New Issue
Block a user