BSP driver for DISCO_L496AG

Dependents:   DISCO_L496AG-LCD-prova_1 DISCO_L496AG-LCD-prova_2 DISCO_L496AG-LCD-demo DISCO_L496AG-SRAM-demo

Revision:
2:106c7b82e064
Parent:
0:d83f1c8ca282
--- a/Drivers/BSP/Components/mfxstm32l152/mfxstm32l152.h	Mon Mar 26 14:35:14 2018 +0200
+++ b/Drivers/BSP/Components/mfxstm32l152/mfxstm32l152.h	Wed Nov 20 16:48:24 2019 +0100
@@ -2,39 +2,21 @@
   ******************************************************************************
   * @file    mfxstm32l152.h
   * @author  MCD Application Team
-  * @version V2.0.0
-  * @date    24-June-2015
   * @brief   This file contains all the functions prototypes for the
   *          mfxstm32l152.c IO expander driver.
   ******************************************************************************
   * @attention
   *
-  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
+  * <h2><center>&copy; Copyright (c) 2015 STMicroelectronics.
+  * All rights reserved.</center></h2>
   *
-  * Redistribution and use in source and binary forms, with or without modification,
-  * are permitted provided that the following conditions are met:
-  *   1. Redistributions of source code must retain the above copyright notice,
-  *      this list of conditions and the following disclaimer.
-  *   2. Redistributions in binary form must reproduce the above copyright notice,
-  *      this list of conditions and the following disclaimer in the documentation
-  *      and/or other materials provided with the distribution.
-  *   3. Neither the name of STMicroelectronics nor the names of its contributors
-  *      may be used to endorse or promote products derived from this software
-  *      without specific prior written permission.
-  *
-  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  * 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
   *
   ******************************************************************************
-  */ 
+  */
 
 /* Define to prevent recursive inclusion -------------------------------------*/
 #ifndef __MFXSTM32L152_H
@@ -42,8 +24,8 @@
 
 #ifdef __cplusplus
  extern "C" {
-#endif   
-   
+#endif
+
 /* Includes ------------------------------------------------------------------*/
 #include "../Common/ts.h"
 #include "../Common/io.h"
@@ -51,21 +33,21 @@
 
 /** @addtogroup BSP
   * @{
-  */ 
+  */
 
 /** @addtogroup Component
   * @{
   */
-    
+
 /** @defgroup MFXSTM32L152
   * @{
-  */    
+  */
 
 /* Exported types ------------------------------------------------------------*/
 
 /** @defgroup MFXSTM32L152_Exported_Types
   * @{
-  */ 
+  */
 typedef struct
 {
   uint8_t SYS_CTRL;
@@ -103,15 +85,15 @@
   */
 
 /* Exported constants --------------------------------------------------------*/
-  
+
 /** @defgroup MFXSTM32L152_Exported_Constants
   * @{
-  */ 
+  */
 
  /**
   * @brief  MFX COMMON defines
   */
-   
+
  /**
   * @brief  Register address: chip IDs (R)
   */
@@ -155,13 +137,13 @@
   * @brief  Reg Addr IRQs: the Main MCU must acknowledge it thanks to a writing access to the IRQ_ACK register
   */
 #define MFXSTM32L152_REG_ADR_IRQ_ACK            ((uint8_t)0x44)
-   
+
   /**
   * @brief  MFXSTM32L152_REG_ADR_ID choices
   */
 #define MFXSTM32L152_ID_1                    ((uint8_t)0x7B)
 #define MFXSTM32L152_ID_2                    ((uint8_t)0x79)
-   
+
   /**
   * @brief  MFXSTM32L152_REG_ADR_SYS_CTRL choices
   */
@@ -199,9 +181,9 @@
 #define MFXSTM32L152_IRQ_IDD                  ((uint8_t)0x02)  /* IDD function irq */
 #define MFXSTM32L152_IRQ_GPIO                 ((uint8_t)0x01)  /* General GPIO irq (only for SRC_EN and PENDING) */
 #define MFXSTM32L152_IRQ_ALL                  ((uint8_t)0xFF)  /* All global interrupts          */
-#define MFXSTM32L152_IRQ_TS                  (MFXSTM32L152_IRQ_TS_DET | MFXSTM32L152_IRQ_TS_NE |  MFXSTM32L152_IRQ_TS_TH | MFXSTM32L152_IRQ_TS_FULL | MFXSTM32L152_IRQ_TS_OVF ) 
+#define MFXSTM32L152_IRQ_TS                  (MFXSTM32L152_IRQ_TS_DET | MFXSTM32L152_IRQ_TS_NE |  MFXSTM32L152_IRQ_TS_TH | MFXSTM32L152_IRQ_TS_FULL | MFXSTM32L152_IRQ_TS_OVF )
 
-   
+
  /**
   * @brief  GPIO: 24 programmable input/output called MFXSTM32L152_GPIO[23:0] are provided
   */
@@ -280,7 +262,7 @@
 #define MFXSTM32L152_REG_ADR_IRQ_GPI_ACK2       ((uint8_t)0x55)  /* gpio [8:15] */
 #define MFXSTM32L152_REG_ADR_IRQ_GPI_ACK3       ((uint8_t)0x56)  /* agpio [0:7] */
 
-   
+
  /**
   * @brief  GPIO: IO Pins definition
   */
@@ -293,14 +275,14 @@
 #define MFXSTM32L152_GPIO_PIN_6                  ((uint32_t)0x0040)
 #define MFXSTM32L152_GPIO_PIN_7                  ((uint32_t)0x0080)
 
-#define MFXSTM32L152_GPIO_PIN_8                  ((uint32_t)0x0100) 
-#define MFXSTM32L152_GPIO_PIN_9                  ((uint32_t)0x0200) 
-#define MFXSTM32L152_GPIO_PIN_10                 ((uint32_t)0x0400) 
+#define MFXSTM32L152_GPIO_PIN_8                  ((uint32_t)0x0100)
+#define MFXSTM32L152_GPIO_PIN_9                  ((uint32_t)0x0200)
+#define MFXSTM32L152_GPIO_PIN_10                 ((uint32_t)0x0400)
 #define MFXSTM32L152_GPIO_PIN_11                 ((uint32_t)0x0800)
-#define MFXSTM32L152_GPIO_PIN_12                 ((uint32_t)0x1000) 
-#define MFXSTM32L152_GPIO_PIN_13                 ((uint32_t)0x2000) 
-#define MFXSTM32L152_GPIO_PIN_14                 ((uint32_t)0x4000) 
-#define MFXSTM32L152_GPIO_PIN_15                 ((uint32_t)0x8000) 
+#define MFXSTM32L152_GPIO_PIN_12                 ((uint32_t)0x1000)
+#define MFXSTM32L152_GPIO_PIN_13                 ((uint32_t)0x2000)
+#define MFXSTM32L152_GPIO_PIN_14                 ((uint32_t)0x4000)
+#define MFXSTM32L152_GPIO_PIN_15                 ((uint32_t)0x8000)
 
 #define MFXSTM32L152_GPIO_PIN_16               ((uint32_t)0x010000)
 #define MFXSTM32L152_GPIO_PIN_17               ((uint32_t)0x020000)
@@ -325,20 +307,20 @@
  /**
   * @brief  GPIO: constant
   */
-#define MFXSTM32L152_GPIO_DIR_IN                ((uint8_t)0x0)  
-#define MFXSTM32L152_GPIO_DIR_OUT               ((uint8_t)0x1)  
-#define MFXSTM32L152_IRQ_GPI_EVT_LEVEL          ((uint8_t)0x0)  
-#define MFXSTM32L152_IRQ_GPI_EVT_EDGE           ((uint8_t)0x1)  
+#define MFXSTM32L152_GPIO_DIR_IN                ((uint8_t)0x0)
+#define MFXSTM32L152_GPIO_DIR_OUT               ((uint8_t)0x1)
+#define MFXSTM32L152_IRQ_GPI_EVT_LEVEL          ((uint8_t)0x0)
+#define MFXSTM32L152_IRQ_GPI_EVT_EDGE           ((uint8_t)0x1)
 #define MFXSTM32L152_IRQ_GPI_TYPE_LLFE          ((uint8_t)0x0)  /* Low Level Falling Edge */
 #define MFXSTM32L152_IRQ_GPI_TYPE_HLRE          ((uint8_t)0x1)  /*High Level Raising Edge */
-#define MFXSTM32L152_GPI_WITHOUT_PULL_RESISTOR  ((uint8_t)0x0)  
-#define MFXSTM32L152_GPI_WITH_PULL_RESISTOR     ((uint8_t)0x1)  
-#define MFXSTM32L152_GPO_PUSH_PULL              ((uint8_t)0x0)  
-#define MFXSTM32L152_GPO_OPEN_DRAIN             ((uint8_t)0x1)  
-#define MFXSTM32L152_GPIO_PULL_DOWN             ((uint8_t)0x0)  
-#define MFXSTM32L152_GPIO_PULL_UP               ((uint8_t)0x1)   
-   
-   
+#define MFXSTM32L152_GPI_WITHOUT_PULL_RESISTOR  ((uint8_t)0x0)
+#define MFXSTM32L152_GPI_WITH_PULL_RESISTOR     ((uint8_t)0x1)
+#define MFXSTM32L152_GPO_PUSH_PULL              ((uint8_t)0x0)
+#define MFXSTM32L152_GPO_OPEN_DRAIN             ((uint8_t)0x1)
+#define MFXSTM32L152_GPIO_PULL_DOWN             ((uint8_t)0x0)
+#define MFXSTM32L152_GPIO_PULL_UP               ((uint8_t)0x1)
+
+
   /**
   * @brief  TOUCH SCREEN Registers
   */
@@ -440,7 +422,7 @@
   */
 #define MFXSTM32L152_REG_ADR_IDD_SHUNTS_ON_BOARD  ((uint8_t)0x98)
 
- 
+
 
 /** @defgroup IDD_Control_Register_Defines  IDD Control Register Defines
   * @{
@@ -521,24 +503,24 @@
   * @}
   */
 
- 
+
 /* Exported macro ------------------------------------------------------------*/
-   
+
 /** @defgroup MFXSTM32L152_Exported_Macros
   * @{
-  */ 
+  */
 
 /**
   * @}
-  */ 
+  */
 
 /* Exported functions --------------------------------------------------------*/
-  
+
 /** @defgroup MFXSTM32L152_Exported_Functions
   * @{
   */
 
-/** 
+/**
   * @brief MFXSTM32L152 Control functions
   */
 void     mfxstm32l152_Init(uint16_t DeviceAddr);
@@ -558,7 +540,7 @@
 void     mfxstm32l152_SetIrqOutPinType(uint16_t DeviceAddr, uint8_t Type);
 
 
-/** 
+/**
   * @brief MFXSTM32L152 IO functionalities functions
   */
 void     mfxstm32l152_IO_Start(uint16_t DeviceAddr, uint32_t IO_Pin);
@@ -578,7 +560,7 @@
 void     mfxstm32l152_IO_EnablePinIT(uint16_t DeviceAddr, uint32_t IO_Pin);
 void     mfxstm32l152_IO_DisablePinIT(uint16_t DeviceAddr, uint32_t IO_Pin);
 
-/** 
+/**
   * @brief MFXSTM32L152 Touch screen functionalities functions
   */
 void     mfxstm32l152_TS_Start(uint16_t DeviceAddr);
@@ -617,7 +599,7 @@
 
 
 
-/** 
+/**
   * @brief iobus prototypes (they should be defined in common/stm32_iobus.h)
   */
 void     MFX_IO_Init(void);
@@ -632,7 +614,7 @@
 
 /**
   * @}
-  */ 
+  */
 
 /* Touch screen driver structure */
 extern TS_DrvTypeDef mfxstm32l152_ts_drv;
@@ -652,7 +634,7 @@
 
 /**
   * @}
-  */ 
+  */
 
 /**
   * @}
@@ -660,9 +642,9 @@
 
 /**
   * @}
-  */ 
+  */
 
 /**
   * @}
-  */       
+  */
 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/