with STS and licence wording

This commit is contained in:
YunHorn Technology 2022-09-30 09:32:32 +08:00
parent 8b3f629004
commit 610f3ff8c0
7 changed files with 215 additions and 216 deletions

View File

@ -1,22 +1,22 @@
/**
******************************************************************************
* @file stm32wlxx_STS.c
* @author MCD Application Team
* @brief This file provides set of firmware functions to manage:
* - LEDs and push-buttons available on STM32WLXX-Nucleo
* Kit from STMicroelectronics
******************************************************************************
* @attention
*
* Copyright (c) 2020-2021 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
******************************************************************************
* @file stm32wlxx_STS.c
* @author YunHorn Technology Limited Application Team
* @brief This file provides set of firmware functions to manage:
* - LEDs and push-buttons available on STM32WLXX-STS
* Kit from YunHorn Technology Limited
******************************************************************************
* @attention
*
* Copyright (c) 2022 YunHorn Technology Limited.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "stm32wlxx_STS.h"
@ -25,18 +25,17 @@
* @{
*/
/** @addtogroup STM32WLXX_NUCLEO
/** @addtogroup STM32WLXX_STS
* @{
*/
/** @addtogroup STM32WLXX_NUCLEO_LOW_LEVEL
* @brief This file provides set of firmware functions to manage LEDs and push-buttons
* on STM32WLXX-Nucleo Kit from STMicroelectronics.
* @{
*/
/** @addtogroup STM32WLXX_STS_LOW_LEVEL
* @brief This file provides set of firmware functions to manage LEDs and push-buttons
* on STM32WLXX-STS Kit from YunHorn Technology Limited.
* @{
*/
/** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_Exported_Variables LOW LEVEL Exported Variables
/** @defgroup STM32WLXX_STS_LOW_LEVEL_Exported_Variables LOW LEVEL Exported Variables
* @{
*/
EXTI_HandleTypeDef hpb_exti[BUTTONn];
@ -47,14 +46,14 @@ UART_HandleTypeDef hcom_uart[COMn];
* @}
*/
/** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_Private_Defines LOW LEVEL Private Defines
/** @defgroup STM32WLXX_STS_LOW_LEVEL_Private_Defines LOW LEVEL Private Defines
* @{
*/
/**
* @}
*/
/** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_Private_TypesDefinitions LOW LEVEL Private Typedef
/** @defgroup STM32WLXX_STS_LOW_LEVEL_Private_TypesDefinitions LOW LEVEL Private Typedef
* @{
*/
typedef void (* BSP_EXTI_LineCallback) (void);
@ -90,7 +89,7 @@ static uint32_t IsComMspCbValid[COMn] = {0};
* @}
*/
/** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_Private_Functions LOW LEVEL Private Functions
/** @defgroup STM32WLXX_STS_LOW_LEVEL_Private_Functions LOW LEVEL Private Functions
* @{
*/
static void BUTTON_SW1_EXTI_Callback(void);
@ -105,12 +104,12 @@ static void COM1_MspDeInit(UART_HandleTypeDef *huart);
*/
/** @addtogroup STM32WLXX_NUCLEO_LOW_LEVEL_Exported_Functions
/** @addtogroup STM32WLXX_STS_LOW_LEVEL_Exported_Functions
* @{
*/
/**
* @brief This method returns the STM32WLXX NUCLEO BSP Driver revision
* @brief This method returns the STM32WLXX STS BSP Driver revision
* @retval version: 0xXYZR (8bits for each decimal, R for RC)
*/
uint32_t BSP_GetVersion(void)

View File

@ -1,20 +1,20 @@
/**
******************************************************************************
* @file stm32wlxx_STS.h
* @author MCD Application Team
* @brief Header for stm32wlxx_STS.c
******************************************************************************
* @attention
*
* Copyright (c) 2020-2021 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
******************************************************************************
* @file stm32wlxx_STS.h
* @author YunHorn Technology Limited Application Team
* @brief Header for stm32wlxx_STS.c
******************************************************************************
* @attention
*
* Copyright (c) 202 YunHorn Technology Limited.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef STM32WLXX_STS_H
@ -25,8 +25,8 @@
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32wlxx_nucleo_errno.h"
#include "stm32wlxx_nucleo_conf.h"
#include "stm32wlxx_STS_errno.h"
#include "stm32wlxx_STS_conf.h"
#if (USE_BSP_COM_FEATURE > 0)
#if (USE_COM_LOG > 0)
@ -40,15 +40,15 @@
* @{
*/
/** @defgroup STM32WLXX_NUCLEO STM32WLXX-NUCLEO
/** @defgroup STM32WLXX_STS STM32WLXX-STS
* @{
*/
/** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL LOW LEVEL
/** @defgroup STM32WLXX_STS_LOW_LEVEL LOW LEVEL
* @{
*/
/** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_Exported_Types LOW LEVEL Exported Types
/** @defgroup STM32WLXX_STS_LOW_LEVEL_Exported_Types LOW LEVEL Exported Types
* @{
*/
typedef enum
@ -137,30 +137,30 @@ typedef enum
* @}
*/
/** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_Exported_Constants LOW LEVEL Exported Constants
/** @defgroup STM32WLXX_STS_LOW_LEVEL_Exported_Constants LOW LEVEL Exported Constants
* @{
*/
/**
* @brief STM32WLXX NUCLEO BSP Driver version number
* @brief STM32WLXX STS BSP Driver version number
*/
#define __STM32WLXX_NUCLEO_BSP_VERSION_MAIN (0x01U) /*!< [31:24] main version */
#define __STM32WLXX_NUCLEO_BSP_VERSION_SUB1 (0x02U) /*!< [23:16] sub1 version */
#define __STM32WLXX_NUCLEO_BSP_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
#define __STM32WLXX_NUCLEO_BSP_VERSION_RC (0x00U) /*!< [7:0] release candidate */
#define __STM32WLXX_NUCLEO_BSP_VERSION ((__STM32WLXX_NUCLEO_BSP_VERSION_MAIN << 24)\
|(__STM32WLXX_NUCLEO_BSP_VERSION_SUB1 << 16)\
|(__STM32WLXX_NUCLEO_BSP_VERSION_SUB2 << 8 )\
|(__STM32WLXX_NUCLEO_BSP_VERSION_RC))
#define __STM32WLXX_STS_BSP_VERSION_MAIN (0x01U) /*!< [31:24] main version */
#define __STM32WLXX_STS_BSP_VERSION_SUB1 (0x02U) /*!< [23:16] sub1 version */
#define __STM32WLXX_STS_BSP_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
#define __STM32WLXX_STS_BSP_VERSION_RC (0x00U) /*!< [7:0] release candidate */
#define __STM32WLXX_STS_BSP_VERSION ((__STM32WLXX_STS_BSP_VERSION_MAIN << 24)\
|(__STM32WLXX_STS_BSP_VERSION_SUB1 << 16)\
|(__STM32WLXX_STS_BSP_VERSION_SUB2 << 8 )\
|(__STM32WLXX_STS_BSP_VERSION_RC))
/**
* @brief Define for STM32WLXX_NUCLEO board
*/
#if !defined (USE_STM32WLXX_NUCLEO)
#define USE_STM32WLXX_NUCLEO
#if !defined (USE_STM32WLXX_STS)
#define USE_STM32WLXX_STS
#endif
/** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_LED LOW LEVEL LED Constants
/** @defgroup STM32WLXX_STS_LOW_LEVEL_LED LOW LEVEL LED Constants
* @{
*/
#define LEDn 3
@ -186,7 +186,7 @@ typedef enum
* @}
*/
/** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_BUTTON LOW LEVEL BUTTON Constants
/** @defgroup STM32WLXX_STS_LOW_LEVEL_BUTTON LOW LEVEL BUTTON Constants
* @{
*/
#define BUTTONn 3
@ -273,7 +273,7 @@ typedef enum
* @}
*/
/** @addtogroup STM32WLXX_NUCLEO_LOW_LEVEL_Exported_Variables
/** @addtogroup STM32WLXX_STS_LOW_LEVEL_Exported_Variables
* @{
*/
extern EXTI_HandleTypeDef hpb_exti[];
@ -284,12 +284,12 @@ extern UART_HandleTypeDef hcom_uart[];
* @}
*/
/** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_Exported_Functions LOW LEVEL Exported Functions
/** @defgroup STM32WLXX_STS_LOW_LEVEL_Exported_Functions LOW LEVEL Exported Functions
* @{
*/
uint32_t BSP_GetVersion(void);
/** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_LED_Functions LOW LEVEL LED Functions
/** @defgroup STM32WLXX_STS_LOW_LEVEL_LED_Functions LOW LEVEL LED Functions
* @{
*/
int32_t BSP_LED_Init(Led_TypeDef Led);
@ -302,7 +302,7 @@ int32_t BSP_LED_GetState(Led_TypeDef Led);
* @}
*/
/** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_BUTTON_Functions LOW LEVEL BUTTON Functions
/** @defgroup STM32WLXX_STS_LOW_LEVEL_BUTTON_Functions LOW LEVEL BUTTON Functions
* @{
*/
int32_t BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef ButtonMode);
@ -315,7 +315,7 @@ void BSP_PB_IRQHandler(Button_TypeDef Button);
*/
#if (USE_BSP_COM_FEATURE > 0)
/** @defgroup STM32WLXX_NUCLEO_LOW_LEVEL_COM_Functions LOW LEVEL COM Port Functions
/** @defgroup STM32WLXX_STS_LOW_LEVEL_COM_Functions LOW LEVEL COM Port Functions
* @{
*/
int32_t BSP_COM_Init(COM_TypeDef COM, COM_InitTypeDef *COM_Init);

74
stm32wlxx_STS_conf.h Normal file
View File

@ -0,0 +1,74 @@
/**
******************************************************************************
* @file stm32wlxx_STS_conf.h
* @author YunHorn Technology Limited Application Team
* @brief STM32WLxx_STS board configuration file.
******************************************************************************
* @attention
*
* Copyright (c) 2022 YunHorn Technology Limited.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef STM32WLXX_STS_CONF_H
#define STM32WLXX_STS_CONF_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32wlxx_hal.h"
/** @addtogroup BSP
* @{
*/
/** @addtogroup STM32WLXX_STS
* @{
*/
/** @defgroup STM32WLXX_STS_CONFIG CONFIG
* @{
*/
/** @defgroup STM32WLXX_STS_CONFIG_Exported_Constants Exported Constants
* @{
*/
/* COM usage define */
#define USE_BSP_COM_FEATURE 0U
/* COM log define */
#define USE_COM_LOG 0U
/* IRQ priorities */
#define BSP_BUTTON_USER_IT_PRIORITY 15U
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* STM32WLXX_STS_CONF_H */

View File

@ -1,24 +1,24 @@
/**
******************************************************************************
* @file stm32wlxx_nucleo_errno.h
* @author MCD Application Team
* @brief Error Code.
******************************************************************************
* @attention
*
* Copyright (c) 2020-2021 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
******************************************************************************
* @file stm32wlxx_STS_errno.h
* @author YunHorn Technology Limited Application Team
* @brief Error Code.
******************************************************************************
* @attention
*
* Copyright (c) 2022 YunHorn Technology Limited.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef STM32WLXX_NUCLEO_ERRNO_H
#define STM32WLXX_NUCLEO_ERRNO_H
#ifndef STM32WLXX_STS_ERRNO_H
#define STM32WLXX_STS_ERRNO_H
#ifdef __cplusplus
extern "C" {
@ -42,4 +42,4 @@
}
#endif
#endif /* STM32WLXX_NUCLEO_ERRNO_H */
#endif /* STM32WLXX_STS_ERRNO_H */

View File

@ -1,22 +1,22 @@
/**
******************************************************************************
* @file stm32wlxx_STS_radio.c
* @author MCD Application Team
* @brief This file provides set of firmware functions to manage:
* - RF circuitry available on STM32WLXX-Nucleo
* Kit from STMicroelectronics
******************************************************************************
* @attention
*
* Copyright (c) 2020-2021 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
******************************************************************************
* @file stm32wlxx_STS_radio.c
* @author YunHorn Technology Limited Application Team
* @brief This file provides set of firmware functions to manage:
* - RF circuitry available on STM32WLXX-STS
* Kit from YunHorn Technology Limited
******************************************************************************
* @attention
*
* Copyright (c) 2022 YunHorn Technology Limited.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "stm32wlxx_STS_radio.h"
@ -25,17 +25,17 @@
* @{
*/
/** @addtogroup STM32WLXX_NUCLEO
/** @addtogroup STM32WLXX_STS
* @{
*/
/** @addtogroup STM32WLXX_NUCLEO_RADIO_LOW_LEVEL
* @brief This file provides set of firmware functions to Radio switch
* available on STM32WLXX-Nucleo Kit from STMicroelectronics.
* @{
*/
/** @addtogroup STM32WLXX_STS_RADIO_LOW_LEVEL
* @brief This file provides set of firmware functions to Radio switch
* available on STM32WLXX-STS Kit from YunHorn Technology Limited.
* @{
*/
/** @addtogroup STM32WLXX_NUCLEO_RADIO_LOW_LEVEL_Exported_Functions
/** @addtogroup STM32WLXX_STS_RADIO_LOW_LEVEL_Exported_Functions
* @{
*/

View File

@ -1,20 +1,20 @@
/**
******************************************************************************
* @file stm32wlxx_STS_radio.h
* @author MCD Application Team
* @brief Header for stm32wlxx_nucleo_radio.c
******************************************************************************
* @attention
*
* Copyright (c) 2020-2021 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
******************************************************************************
* @file stm32wlxx_STS_radio.h
* @author YunHorn Technology Limited Application Team
* @brief Header for stm32wlxx_STS_radio.c
******************************************************************************
* @attention
*
* Copyright (c) 2022 YunHorn Technology Limited.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef STM32WLXX_STS_RADIO_H
@ -25,23 +25,23 @@
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32wlxx_nucleo_errno.h"
#include "stm32wlxx_nucleo_conf.h"
#include "stm32wlxx_STS_errno.h"
#include "stm32wlxx_STS_conf.h"
/** @addtogroup BSP
* @{
*/
/** @addtogroup STM32WLXX_NUCLEO STM32WLXX-NUCLEO
/** @addtogroup STM32WLXX_STS STM32WLXX-STS
* @{
*/
/** @defgroup STM32WLXX_NUCLEO_RADIO_LOW_LEVEL RADIO LOW LEVEL
/** @defgroup STM32WLXX_STS_RADIO_LOW_LEVEL RADIO LOW LEVEL
* @{
*/
/** @defgroup STM32WLXX_NUCLEO_RADIO_LOW_LEVEL_Exported_Types RADIO LOW LEVEL Exported Types
/** @defgroup STM32WLXX_STS_RADIO_LOW_LEVEL_Exported_Types RADIO LOW LEVEL Exported Types
* @{
*/
@ -63,11 +63,11 @@ typedef enum
* @}
*/
/** @defgroup STM32WLXX_NUCLEO_RADIO_LOW_LEVEL_Exported_Constants RADIO LOW LEVEL Exported Constants
/** @defgroup STM32WLXX_STS_RADIO_LOW_LEVEL_Exported_Constants RADIO LOW LEVEL Exported Constants
* @{
*/
/** @defgroup STM32WLXX_NUCLEO_RADIO_LOW_LEVEL_RADIOCONFIG RADIO LOW LEVEL RADIO CONFIG Constants
/** @defgroup STM32WLXX_STS_RADIO_LOW_LEVEL_RADIOCONFIG RADIO LOW LEVEL RADIO CONFIG Constants
* @{
*/
#define RADIO_CONF_RFO_LP_HP 0U
@ -92,7 +92,7 @@ typedef enum
* @}
*/
/** @defgroup STM32WLXX_NUCLEO_RADIO_LOW_LEVEL_RFSWITCH RADIO LOW LEVEL RF SWITCH Constants
/** @defgroup STM32WLXX_STS_RADIO_LOW_LEVEL_RFSWITCH RADIO LOW LEVEL RF SWITCH Constants
* @{
**
**
@ -123,7 +123,7 @@ typedef enum
#define RF_SW_CTRL3_GPIO_PORT GPIOA
#define RF_SW_CTRL3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
#define RF_SW_CTRL3_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
// NOT USED CTRL1_PIN
// YunHorn Technology Limited, STS NOT USED CTRL1_PIN
#define RF_SW_CTRL1_PIN GPIO_PIN_4
#define RF_SW_CTRL1_GPIO_PORT GPIOC
#define RF_SW_CTRL1_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
@ -147,7 +147,7 @@ typedef enum
* @}
*/
/** @defgroup STM32WLXX_NUCLEO_RADIO_LOW_LEVEL_Exported_Functions RADIO LOW LEVEL Exported Functions
/** @defgroup STM32WLXX_STS_RADIO_LOW_LEVEL_Exported_Functions RADIO LOW LEVEL Exported Functions
* @{
*/
int32_t BSP_RADIO_Init(void);
@ -178,4 +178,4 @@ int32_t BSP_RADIO_GetRFOMaxPowerConfig(BSP_RADIO_RFOMaxPowerConfig_TypeDef Confi
}
#endif
#endif /* STM32WLXX_NUCLEO_RADIO_H */
#endif /* STM32WLXX_STS_RADIO_H */

View File

@ -1,74 +0,0 @@
/**
******************************************************************************
* @file stm32wlxx_nucleo_conf.h
* @author MCD Application Team
* @brief STM32WLxx_Nucleo board configuration file.
******************************************************************************
* @attention
*
* Copyright (c) 2020-2021 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef STM32WLXX_NUCLEO_CONF_H
#define STM32WLXX_NUCLEO_CONF_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32wlxx_hal.h"
/** @addtogroup BSP
* @{
*/
/** @addtogroup STM32WLXX_NUCLEO
* @{
*/
/** @defgroup STM32WLXX_NUCLEO_CONFIG CONFIG
* @{
*/
/** @defgroup STM32WLXX_NUCLEO_CONFIG_Exported_Constants Exported Constants
* @{
*/
/* COM usage define */
#define USE_BSP_COM_FEATURE 0U
/* COM log define */
#define USE_COM_LOG 0U
/* IRQ priorities */
#define BSP_BUTTON_USER_IT_PRIORITY 15U
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* STM32WLXX_NUCLEO_CONF_H */