ST / BSP_DISCO_L476VG

Dependents:   DiscoLogger DISCO_L476VG_GlassLCD DISCO_L476VG_MicrophoneRecorder DISCO_L476VG_UART ... more

Revision:
3:4c7d003a8259
Parent:
1:917af0ca86df
Child:
5:4943b15cce9f
diff -r 23fea64454eb -r 4c7d003a8259 Drivers/BSP/STM32L476G-Discovery/stm32l476g_discovery.h
--- a/Drivers/BSP/STM32L476G-Discovery/stm32l476g_discovery.h	Thu Jul 06 09:09:44 2017 +0000
+++ b/Drivers/BSP/STM32L476G-Discovery/stm32l476g_discovery.h	Wed Jan 17 14:57:52 2018 +0100
@@ -2,9 +2,7 @@
   ******************************************************************************
   * @file    stm32l476g_discovery.h
   * @author  MCD Application Team
-  * @version V2.0.0
-  * @date    07-April-2017
-  * @brief   This file contains definitions for STM32L476G_DISCOVERY's LEDs, 
+  * @brief   This file contains definitions for STM32L476G_DISCOVERY's LEDs,
   *          push-buttons hardware resources (MB1184).
   ******************************************************************************
   * @attention
@@ -41,10 +39,10 @@
 #define __STM32L476G_DISCOVERY_H
 
 #ifdef __cplusplus
- extern "C" {
+extern "C" {
 #endif
 
-/** 
+/**
   * @brief  Define for STM32L476G_DISCOVERY board
   */
 #if !defined (USE_STM32L476G_DISCO_REVC) && !defined (USE_STM32L476G_DISCO_REVB) && !defined (USE_STM32L476G_DISCO_REVA)
@@ -81,7 +79,8 @@
   DISCO_LED5 = 1,
   LED_RED    = DISCO_LED4,
   LED_GREEN  = DISCO_LED5
-}Led_TypeDef;
+}
+Led_TypeDef;
 #elif defined (USE_STM32L476G_DISCO_REVA)
 typedef enum
 {
@@ -89,34 +88,35 @@
   DISCO_LED4 = 1,
   LED_RED    = DISCO_LED3,
   LED_GREEN  = DISCO_LED4
-}Led_TypeDef;
+}
+Led_TypeDef;
 #endif
 
 /**
  * @brief JOYSTICK Types Definition
  */
-typedef enum 
-{ 
+typedef enum
+{
   JOY_SEL   = 0,
   JOY_LEFT  = 1,
   JOY_RIGHT = 2,
   JOY_DOWN  = 3,
   JOY_UP    = 4,
   JOY_NONE  = 5
-}JOYState_TypeDef;
+} JOYState_TypeDef;
 
-typedef enum 
-{  
+typedef enum
+{
   JOY_MODE_GPIO = 0,
   JOY_MODE_EXTI = 1
-}JOYMode_TypeDef;
+} JOYMode_TypeDef;
 
-typedef enum 
-{  
+typedef enum
+{
   SUPPLY_MODE_ERROR = 0,
   SUPPLY_MODE_EXTERNAL = 1,
   SUPPLY_MODE_BATTERY = 2
-}SupplyMode_TypeDef;
+} SupplyMode_TypeDef;
 
 /**
   * @}
@@ -135,7 +135,7 @@
 #define BATTERY_DETECTION_GPIO_CLK_DISABLE()  __HAL_RCC_GPIOB_CLK_DISABLE()
 /**
   * @}
-  */ 
+  */
 
 /** @defgroup STM32L476G_DISCOVERY_LED LED Constants
   * @{
@@ -202,7 +202,7 @@
 #define LEFT_JOY_GPIO_PORT                GPIOA
 #define LEFT_JOY_GPIO_CLK_ENABLE()        __HAL_RCC_GPIOA_CLK_ENABLE()
 #define LEFT_JOY_GPIO_CLK_DISABLE()       __HAL_RCC_GPIOA_CLK_DISABLE()
-#define LEFT_JOY_EXTI_IRQn                EXTI1_IRQn  
+#define LEFT_JOY_EXTI_IRQn                EXTI1_IRQn
 
 /**
 * @brief Joystick Up push-button
@@ -215,7 +215,7 @@
 
 /**
  * @brief Joystick Down push-button
- */  
+ */
 #define DOWN_JOY_PIN                      GPIO_PIN_5   /* PA.05 */
 #define DOWN_JOY_GPIO_PORT                GPIOA
 #define DOWN_JOY_GPIO_CLK_ENABLE()        __HAL_RCC_GPIOA_CLK_ENABLE()
@@ -229,7 +229,7 @@
 #define SEL_JOY_GPIO_PORT                 GPIOA
 #define SEL_JOY_GPIO_CLK_ENABLE()         __HAL_RCC_GPIOA_CLK_ENABLE()
 #define SEL_JOY_GPIO_CLK_DISABLE()        __HAL_RCC_GPIOA_CLK_DISABLE()
-#define SEL_JOY_EXTI_IRQn                 EXTI0_IRQn 
+#define SEL_JOY_EXTI_IRQn                 EXTI0_IRQn
 
 #define JOYx_GPIO_CLK_ENABLE(__JOY__)     do { if((__JOY__) == JOY_SEL)   { SEL_JOY_GPIO_CLK_ENABLE();   } else \
                                                if((__JOY__) == JOY_DOWN)  { DOWN_JOY_GPIO_CLK_ENABLE();  } else \
@@ -274,8 +274,8 @@
    conditions (interrupts routines ...). */
 #define SPIx_TIMEOUT_MAX                        ((uint32_t)0x1000)
 /* Read/Write command */
-#define READWRITE_CMD                           ((uint8_t)0x80) 
-/* Multiple byte read/write command */ 
+#define READWRITE_CMD                           ((uint8_t)0x80)
+/* Multiple byte read/write command */
 #define MULTIPLEBYTE_CMD                        ((uint8_t)0x40)
 /* Dummy Byte Send by the SPI Master device in order to generate the Clock to the Slave device */
 #define DUMMY_BYTE                              ((uint8_t)0x00)
@@ -284,7 +284,7 @@
 
 #if defined(HAL_I2C_MODULE_ENABLED)
 /*##################### I2C1 ###################################*/
-/* User can use this section to tailor I2C1 instance used and associated 
+/* User can use this section to tailor I2C1 instance used and associated
    resources */
 /* Definition for I2C1 Pins */
 #define DISCOVERY_I2C1_SCL_GPIO_PORT            GPIOB
@@ -308,7 +308,7 @@
 #define DISCOVERY_I2C1_SCL_GPIO_CLK_DISABLE()   __HAL_RCC_GPIOB_CLK_DISABLE()
 #define DISCOVERY_I2C1_FORCE_RESET()            __HAL_RCC_I2C1_FORCE_RESET()
 #define DISCOVERY_I2C1_RELEASE_RESET()          __HAL_RCC_I2C1_RELEASE_RESET()
-    
+
 /* Definition for I2C1's NVIC */
 #define DISCOVERY_I2C1_EV_IRQn                  I2C1_EV_IRQn
 #define DISCOVERY_I2C1_EV_IRQHandler            I2C1_EV_IRQHandler
@@ -319,15 +319,15 @@
 /* I2C TIMING is calculated in case of the I2C Clock source is the SYSCLK = 80 MHz */
 /* Set 0x90112626 value to reach 100 KHz speed (Rise time = 640ns, Fall time = 20ns) */
 #ifndef DISCOVERY_I2C1_TIMING
- #define DISCOVERY_I2C1_TIMING                  0x90112626
+#define DISCOVERY_I2C1_TIMING                  0x90112626
 #endif /* DISCOVERY_I2C1_TIMING */
 
-/* I2C clock speed configuration (in Hz) 
-   WARNING: 
-   Make sure that this define is not already declared in other files (ie. 
+/* I2C clock speed configuration (in Hz)
+   WARNING:
+   Make sure that this define is not already declared in other files (ie.
    stm324xg_discovery.h file). It can be used in parallel by other modules. */
 #ifndef BSP_I2C_SPEED
- #define BSP_I2C_SPEED                              100000
+#define BSP_I2C_SPEED                              100000
 #endif /* BSP_I2C_SPEED */
 
 
@@ -338,12 +338,12 @@
    on accurate values, they just guarantee that the application will not remain
    stuck if the I2C communication is corrupted.
    You may modify these timeout values depending on CPU frequency and application
-   conditions (interrupts routines ...). */   
+   conditions (interrupts routines ...). */
 #define DISCOVERY_I2C1_TIMEOUT_MAX              3000
 
 
 /*##################### I2C2 ###################################*/
-/* User can use this section to tailor I2C2 instance used and associated 
+/* User can use this section to tailor I2C2 instance used and associated
    resources */
 /* Definition for I2C2 Pins */
 #define DISCOVERY_I2C2_SCL_PIN                  GPIO_PIN_10
@@ -361,7 +361,7 @@
 #define DISCOVERY_I2C2_SCL_GPIO_CLK_DISABLE()   __HAL_RCC_GPIOB_CLK_DISABLE()
 #define DISCOVERY_I2C2_FORCE_RESET()            __HAL_RCC_I2C2_FORCE_RESET()
 #define DISCOVERY_I2C2_RELEASE_RESET()          __HAL_RCC_I2C2_RELEASE_RESET()
-    
+
 /* Definition for I2C2's NVIC */
 #define DISCOVERY_I2C2_EV_IRQn                  I2C2_EV_IRQn
 #define DISCOVERY_I2C2_ER_IRQn                  I2C2_ER_IRQn
@@ -370,15 +370,15 @@
 /* I2C TIMING is calculated in case of the I2C Clock source is the SYSCLK = 80 MHz */
 /* Set 0x90112626 value to reach 100 KHz speed (Rise time = 640ns, Fall time = 20ns) */
 #ifndef DISCOVERY_I2C2_TIMING
- #define DISCOVERY_I2C2_TIMING                  0x90112626
+#define DISCOVERY_I2C2_TIMING                  0x90112626
 #endif /* DISCOVERY_I2C2_TIMING */
 
-/* I2C clock speed configuration (in Hz) 
-   WARNING: 
-   Make sure that this define is not already declared in other files (ie. 
+/* I2C clock speed configuration (in Hz)
+   WARNING:
+   Make sure that this define is not already declared in other files (ie.
    stm324xg_discovery.h file). It can be used in parallel by other modules. */
 #ifndef BSP_I2C_SPEED
- #define BSP_I2C_SPEED                              100000
+#define BSP_I2C_SPEED                              100000
 #endif /* BSP_I2C_SPEED */
 
 #define IDD_I2C_ADDRESS                         ((uint16_t) 0x84)
@@ -387,7 +387,7 @@
    on accurate values, they just guarantee that the application will not remain
    stuck if the I2C communication is corrupted.
    You may modify these timeout values depending on CPU frequency and application
-   conditions (interrupts routines ...). */   
+   conditions (interrupts routines ...). */
 #define DISCOVERY_I2C2_TIMEOUT_MAX              3000
 #endif /* HAL_I2C_MODULE_ENABLED */
 
@@ -466,7 +466,7 @@
   */
 #define GYRO_CS_LOW()                           HAL_GPIO_WritePin(GYRO_CS_GPIO_PORT, GYRO_CS_PIN, GPIO_PIN_RESET)
 #define GYRO_CS_HIGH()                          HAL_GPIO_WritePin(GYRO_CS_GPIO_PORT, GYRO_CS_PIN, GPIO_PIN_SET)
-  
+
 /**
   * @brief  Gyroscope SPI Interface pins
   */