BSP_DISCO_L4R9I

Dependents:   DISCO_L4R9I-LCD-demo

Committer:
Jerome Coutant
Date:
Tue Nov 26 14:35:07 2019 +0100
Revision:
1:2105b8894450
Parent:
0:31ddfafdd3da
Update for MBED use

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Jerome Coutant 0:31ddfafdd3da 1 /**
Jerome Coutant 0:31ddfafdd3da 2 ******************************************************************************
Jerome Coutant 0:31ddfafdd3da 3 * @file stm32l4r9i_discovery_io.h
Jerome Coutant 0:31ddfafdd3da 4 * @author MCD Application Team
Jerome Coutant 0:31ddfafdd3da 5 * @brief This file contains the common defines and functions prototypes for
Jerome Coutant 0:31ddfafdd3da 6 * the stm32l4r9i_discovery_io.c driver.
Jerome Coutant 0:31ddfafdd3da 7 ******************************************************************************
Jerome Coutant 0:31ddfafdd3da 8 * @attention
Jerome Coutant 0:31ddfafdd3da 9 *
Jerome Coutant 0:31ddfafdd3da 10 * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
Jerome Coutant 0:31ddfafdd3da 11 * All rights reserved.</center></h2>
Jerome Coutant 0:31ddfafdd3da 12 *
Jerome Coutant 0:31ddfafdd3da 13 * This software component is licensed by ST under BSD 3-Clause license,
Jerome Coutant 0:31ddfafdd3da 14 * the "License"; You may not use this file except in compliance with the
Jerome Coutant 0:31ddfafdd3da 15 * License. You may obtain a copy of the License at:
Jerome Coutant 0:31ddfafdd3da 16 * opensource.org/licenses/BSD-3-Clause
Jerome Coutant 0:31ddfafdd3da 17 *
Jerome Coutant 0:31ddfafdd3da 18 ******************************************************************************
Jerome Coutant 0:31ddfafdd3da 19 */
Jerome Coutant 0:31ddfafdd3da 20
Jerome Coutant 0:31ddfafdd3da 21 /* Define to prevent recursive inclusion -------------------------------------*/
Jerome Coutant 0:31ddfafdd3da 22 #ifndef __STM32L4R9I_DISCO_IO_H
Jerome Coutant 0:31ddfafdd3da 23 #define __STM32L4R9I_DISCO_IO_H
Jerome Coutant 0:31ddfafdd3da 24
Jerome Coutant 0:31ddfafdd3da 25 #ifdef __cplusplus
Jerome Coutant 0:31ddfafdd3da 26 extern "C" {
Jerome Coutant 0:31ddfafdd3da 27 #endif
Jerome Coutant 0:31ddfafdd3da 28
Jerome Coutant 0:31ddfafdd3da 29 /* Includes ------------------------------------------------------------------*/
Jerome Coutant 0:31ddfafdd3da 30 #include "stm32l4r9i_discovery.h"
Jerome Coutant 0:31ddfafdd3da 31 #include "../Components/mfxstm32l152/mfxstm32l152.h"
Jerome Coutant 0:31ddfafdd3da 32
Jerome Coutant 0:31ddfafdd3da 33 /** @addtogroup BSP
Jerome Coutant 0:31ddfafdd3da 34 * @{
Jerome Coutant 0:31ddfafdd3da 35 */
Jerome Coutant 0:31ddfafdd3da 36
Jerome Coutant 0:31ddfafdd3da 37 /** @addtogroup STM32L4R9I_DISCOVERY
Jerome Coutant 0:31ddfafdd3da 38 * @{
Jerome Coutant 0:31ddfafdd3da 39 */
Jerome Coutant 0:31ddfafdd3da 40
Jerome Coutant 0:31ddfafdd3da 41 /** @addtogroup STM32L4R9I_DISCOVERY_IO
Jerome Coutant 0:31ddfafdd3da 42 * @{
Jerome Coutant 0:31ddfafdd3da 43 */
Jerome Coutant 0:31ddfafdd3da 44
Jerome Coutant 0:31ddfafdd3da 45 /* Exported types ------------------------------------------------------------*/
Jerome Coutant 0:31ddfafdd3da 46
Jerome Coutant 0:31ddfafdd3da 47 /** @defgroup STM32L4R9I_DISCOVERY_IO_Exported_Types Exported Types
Jerome Coutant 0:31ddfafdd3da 48 * @{
Jerome Coutant 0:31ddfafdd3da 49 */
Jerome Coutant 0:31ddfafdd3da 50 typedef enum
Jerome Coutant 0:31ddfafdd3da 51 {
Jerome Coutant 0:31ddfafdd3da 52 IO_OK = 0x00,
Jerome Coutant 0:31ddfafdd3da 53 IO_ERROR = 0x01,
Jerome Coutant 0:31ddfafdd3da 54 IO_TIMEOUT = 0x02
Jerome Coutant 0:31ddfafdd3da 55 }IO_StatusTypeDef;
Jerome Coutant 0:31ddfafdd3da 56 /**
Jerome Coutant 0:31ddfafdd3da 57 * @}
Jerome Coutant 0:31ddfafdd3da 58 */
Jerome Coutant 0:31ddfafdd3da 59
Jerome Coutant 0:31ddfafdd3da 60 /** @defgroup STM32L4R9I_DISCOVERY_IO_Exported_Constants Exported Constants
Jerome Coutant 0:31ddfafdd3da 61 * @{
Jerome Coutant 0:31ddfafdd3da 62 */
Jerome Coutant 0:31ddfafdd3da 63 #define IO_PIN_0 ((uint32_t)0x00000001)
Jerome Coutant 0:31ddfafdd3da 64 #define IO_PIN_1 ((uint32_t)0x00000002)
Jerome Coutant 0:31ddfafdd3da 65 #define IO_PIN_2 ((uint32_t)0x00000004)
Jerome Coutant 0:31ddfafdd3da 66 #define IO_PIN_3 ((uint32_t)0x00000008)
Jerome Coutant 0:31ddfafdd3da 67 #define IO_PIN_4 ((uint32_t)0x00000010)
Jerome Coutant 0:31ddfafdd3da 68 #define IO_PIN_5 ((uint32_t)0x00000020)
Jerome Coutant 0:31ddfafdd3da 69 #define IO_PIN_6 ((uint32_t)0x00000040)
Jerome Coutant 0:31ddfafdd3da 70 #define IO_PIN_7 ((uint32_t)0x00000080)
Jerome Coutant 0:31ddfafdd3da 71 #define IO_PIN_8 ((uint32_t)0x00000100)
Jerome Coutant 0:31ddfafdd3da 72 #define IO_PIN_9 ((uint32_t)0x00000200)
Jerome Coutant 0:31ddfafdd3da 73 #define IO_PIN_10 ((uint32_t)0x00000400)
Jerome Coutant 0:31ddfafdd3da 74 #define IO_PIN_11 ((uint32_t)0x00000800)
Jerome Coutant 0:31ddfafdd3da 75 #define IO_PIN_12 ((uint32_t)0x00001000)
Jerome Coutant 0:31ddfafdd3da 76 #define IO_PIN_13 ((uint32_t)0x00002000)
Jerome Coutant 0:31ddfafdd3da 77 #define IO_PIN_14 ((uint32_t)0x00004000)
Jerome Coutant 0:31ddfafdd3da 78 #define IO_PIN_15 ((uint32_t)0x00008000)
Jerome Coutant 0:31ddfafdd3da 79 #define AGPIO_PIN_0 ((uint32_t)0x00010000)
Jerome Coutant 0:31ddfafdd3da 80 #define AGPIO_PIN_1 ((uint32_t)0x00020000)
Jerome Coutant 0:31ddfafdd3da 81 #define AGPIO_PIN_2 ((uint32_t)0x00040000)
Jerome Coutant 0:31ddfafdd3da 82 #define IO_PIN_ALL ((uint32_t)0x0003FFFF)
Jerome Coutant 0:31ddfafdd3da 83 /**
Jerome Coutant 0:31ddfafdd3da 84 * @}
Jerome Coutant 0:31ddfafdd3da 85 */
Jerome Coutant 0:31ddfafdd3da 86
Jerome Coutant 0:31ddfafdd3da 87 /* Exported functions --------------------------------------------------------*/
Jerome Coutant 0:31ddfafdd3da 88
Jerome Coutant 0:31ddfafdd3da 89 /** @defgroup STM32L4R9I_DISCOVERY_IO_Exported_Functions Exported Functions
Jerome Coutant 0:31ddfafdd3da 90 * @{
Jerome Coutant 0:31ddfafdd3da 91 */
Jerome Coutant 0:31ddfafdd3da 92
Jerome Coutant 0:31ddfafdd3da 93 uint8_t BSP_IO_Init(void);
Jerome Coutant 0:31ddfafdd3da 94 uint8_t BSP_IO_DeInit(void);
Jerome Coutant 0:31ddfafdd3da 95 uint32_t BSP_IO_ITGetStatus(uint32_t IO_Pin);
Jerome Coutant 0:31ddfafdd3da 96 void BSP_IO_ITClear(uint32_t IO_Pin);
Jerome Coutant 0:31ddfafdd3da 97 uint8_t BSP_IO_ConfigPin(uint32_t IO_Pin, IO_ModeTypedef IO_Mode);
Jerome Coutant 0:31ddfafdd3da 98 void BSP_IO_WritePin(uint32_t IO_Pin, uint8_t PinState);
Jerome Coutant 0:31ddfafdd3da 99 uint32_t BSP_IO_ReadPin(uint32_t IO_Pin);
Jerome Coutant 0:31ddfafdd3da 100 void BSP_IO_TogglePin(uint32_t IO_Pin);
Jerome Coutant 0:31ddfafdd3da 101
Jerome Coutant 0:31ddfafdd3da 102 /**
Jerome Coutant 0:31ddfafdd3da 103 * @}
Jerome Coutant 0:31ddfafdd3da 104 */
Jerome Coutant 0:31ddfafdd3da 105
Jerome Coutant 0:31ddfafdd3da 106 /**
Jerome Coutant 0:31ddfafdd3da 107 * @}
Jerome Coutant 0:31ddfafdd3da 108 */
Jerome Coutant 0:31ddfafdd3da 109
Jerome Coutant 0:31ddfafdd3da 110 /**
Jerome Coutant 0:31ddfafdd3da 111 * @}
Jerome Coutant 0:31ddfafdd3da 112 */
Jerome Coutant 0:31ddfafdd3da 113
Jerome Coutant 0:31ddfafdd3da 114 /**
Jerome Coutant 0:31ddfafdd3da 115 * @}
Jerome Coutant 0:31ddfafdd3da 116 */
Jerome Coutant 0:31ddfafdd3da 117
Jerome Coutant 0:31ddfafdd3da 118 #ifdef __cplusplus
Jerome Coutant 0:31ddfafdd3da 119 }
Jerome Coutant 0:31ddfafdd3da 120 #endif
Jerome Coutant 0:31ddfafdd3da 121
Jerome Coutant 0:31ddfafdd3da 122 #endif /* __STM32L4R9I_DISCOVERY_IO_H */
Jerome Coutant 0:31ddfafdd3da 123
Jerome Coutant 0:31ddfafdd3da 124 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/