Contains the BSP driver for the B-L475E-IOT01 board.

Dependents:   mbed-os-example-ble-Thermometer DISCO_L475VG_IOT01-Telegram-BOT DISCO_L475VG_IOT01-sche_cheveux DISCO_L475VG_IOT01-QSPI_FLASH_FILE_SYSTEM ... more

https://os.mbed.com/platforms/ST-Discovery-L475E-IOT01A/

Committer:
jeromecoutant
Date:
Tue Sep 24 15:30:09 2019 +0200
Revision:
7:bfe8272ced90
Parent:
6:9dfa42666f03
Update BSP files with STM32Cube L4 V1.14.0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bcostm 1:138e8076f348 1 /**
bcostm 1:138e8076f348 2 ******************************************************************************
bcostm 1:138e8076f348 3 * @file io.h
bcostm 1:138e8076f348 4 * @author MCD Application Team
bcostm 1:138e8076f348 5 * @brief This file contains all the functions prototypes for the IO driver.
bcostm 1:138e8076f348 6 ******************************************************************************
bcostm 1:138e8076f348 7 * @attention
bcostm 1:138e8076f348 8 *
jeromecoutant 7:bfe8272ced90 9 * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
jeromecoutant 7:bfe8272ced90 10 * All rights reserved.</center></h2>
bcostm 1:138e8076f348 11 *
jeromecoutant 7:bfe8272ced90 12 * This software component is licensed by ST under BSD 3-Clause license,
jeromecoutant 7:bfe8272ced90 13 * the "License"; You may not use this file except in compliance with the
jeromecoutant 7:bfe8272ced90 14 * License. You may obtain a copy of the License at:
jeromecoutant 7:bfe8272ced90 15 * opensource.org/licenses/BSD-3-Clause
bcostm 1:138e8076f348 16 *
bcostm 1:138e8076f348 17 ******************************************************************************
bcostm 1:138e8076f348 18 */
bcostm 1:138e8076f348 19
bcostm 1:138e8076f348 20 /* Define to prevent recursive inclusion -------------------------------------*/
bcostm 1:138e8076f348 21 #ifndef __IO_H
bcostm 1:138e8076f348 22 #define __IO_H
bcostm 1:138e8076f348 23
bcostm 1:138e8076f348 24 #ifdef __cplusplus
bcostm 1:138e8076f348 25 extern "C" {
bcostm 1:138e8076f348 26 #endif
bcostm 1:138e8076f348 27
bcostm 1:138e8076f348 28 /* Includes ------------------------------------------------------------------*/
bcostm 1:138e8076f348 29 #include <stdint.h>
bcostm 1:138e8076f348 30
bcostm 1:138e8076f348 31 /** @addtogroup BSP
bcostm 1:138e8076f348 32 * @{
bcostm 1:138e8076f348 33 */
bcostm 1:138e8076f348 34
bcostm 1:138e8076f348 35 /** @addtogroup Components
bcostm 1:138e8076f348 36 * @{
bcostm 1:138e8076f348 37 */
bcostm 1:138e8076f348 38
bcostm 1:138e8076f348 39 /** @addtogroup IO
bcostm 1:138e8076f348 40 * @{
bcostm 1:138e8076f348 41 */
bcostm 1:138e8076f348 42
bcostm 1:138e8076f348 43 /** @defgroup IO_Exported_Types
bcostm 1:138e8076f348 44 * @{
bcostm 1:138e8076f348 45 */
bcostm 1:138e8076f348 46
bcostm 1:138e8076f348 47 /**
bcostm 1:138e8076f348 48 * @brief IO Bit SET and Bit RESET enumeration
bcostm 1:138e8076f348 49 */
bcostm 1:138e8076f348 50 typedef enum
bcostm 1:138e8076f348 51 {
bcostm 1:138e8076f348 52 IO_PIN_RESET = 0,
bcostm 1:138e8076f348 53 IO_PIN_SET
bcostm 1:138e8076f348 54 }IO_PinState;
bcostm 1:138e8076f348 55
bcostm 1:138e8076f348 56 typedef enum
bcostm 1:138e8076f348 57 {
bcostm 1:138e8076f348 58 IO_MODE_INPUT = 0, /* input floating */
bcostm 1:138e8076f348 59 IO_MODE_OUTPUT, /* output Push Pull */
bcostm 1:138e8076f348 60 IO_MODE_IT_RISING_EDGE, /* float input - irq detect on rising edge */
bcostm 1:138e8076f348 61 IO_MODE_IT_FALLING_EDGE, /* float input - irq detect on falling edge */
bcostm 1:138e8076f348 62 IO_MODE_IT_LOW_LEVEL, /* float input - irq detect on low level */
bcostm 1:138e8076f348 63 IO_MODE_IT_HIGH_LEVEL, /* float input - irq detect on high level */
bcostm 1:138e8076f348 64 /* following modes only available on MFX*/
bcostm 1:138e8076f348 65 IO_MODE_ANALOG, /* analog mode */
bcostm 1:138e8076f348 66 IO_MODE_OFF, /* when pin isn't used*/
bcostm 1:138e8076f348 67 IO_MODE_INPUT_PU, /* input with internal pull up resistor */
bcostm 1:138e8076f348 68 IO_MODE_INPUT_PD, /* input with internal pull down resistor */
bcostm 1:138e8076f348 69 IO_MODE_OUTPUT_OD, /* Open Drain output without internal resistor */
bcostm 1:138e8076f348 70 IO_MODE_OUTPUT_OD_PU, /* Open Drain output with internal pullup resistor */
bcostm 1:138e8076f348 71 IO_MODE_OUTPUT_OD_PD, /* Open Drain output with internal pulldown resistor */
bcostm 1:138e8076f348 72 IO_MODE_OUTPUT_PP, /* PushPull output without internal resistor */
bcostm 1:138e8076f348 73 IO_MODE_OUTPUT_PP_PU, /* PushPull output with internal pullup resistor */
bcostm 1:138e8076f348 74 IO_MODE_OUTPUT_PP_PD, /* PushPull output with internal pulldown resistor */
bcostm 1:138e8076f348 75 IO_MODE_IT_RISING_EDGE_PU, /* push up resistor input - irq on rising edge */
bcostm 1:138e8076f348 76 IO_MODE_IT_RISING_EDGE_PD, /* push dw resistor input - irq on rising edge */
bcostm 1:138e8076f348 77 IO_MODE_IT_FALLING_EDGE_PU, /* push up resistor input - irq on falling edge */
bcostm 1:138e8076f348 78 IO_MODE_IT_FALLING_EDGE_PD, /* push dw resistor input - irq on falling edge */
bcostm 1:138e8076f348 79 IO_MODE_IT_LOW_LEVEL_PU, /* push up resistor input - irq detect on low level */
bcostm 1:138e8076f348 80 IO_MODE_IT_LOW_LEVEL_PD, /* push dw resistor input - irq detect on low level */
bcostm 1:138e8076f348 81 IO_MODE_IT_HIGH_LEVEL_PU, /* push up resistor input - irq detect on high level */
bcostm 1:138e8076f348 82 IO_MODE_IT_HIGH_LEVEL_PD, /* push dw resistor input - irq detect on high level */
bcostm 1:138e8076f348 83
bcostm 1:138e8076f348 84 }IO_ModeTypedef;
bcostm 1:138e8076f348 85
bcostm 1:138e8076f348 86 /** @defgroup IO_Driver_structure IO Driver structure
bcostm 1:138e8076f348 87 * @{
bcostm 1:138e8076f348 88 */
bcostm 1:138e8076f348 89 typedef struct
bcostm 1:138e8076f348 90 {
bcostm 1:138e8076f348 91 void (*Init)(uint16_t);
bcostm 1:138e8076f348 92 uint16_t (*ReadID)(uint16_t);
bcostm 1:138e8076f348 93 void (*Reset)(uint16_t);
bcostm 1:138e8076f348 94
bcostm 1:138e8076f348 95 void (*Start)(uint16_t, uint32_t);
bcostm 1:138e8076f348 96 uint8_t (*Config)(uint16_t, uint32_t, IO_ModeTypedef);
bcostm 1:138e8076f348 97 void (*WritePin)(uint16_t, uint32_t, uint8_t);
bcostm 1:138e8076f348 98 uint32_t (*ReadPin)(uint16_t, uint32_t);
bcostm 1:138e8076f348 99
bcostm 1:138e8076f348 100 void (*EnableIT)(uint16_t);
bcostm 1:138e8076f348 101 void (*DisableIT)(uint16_t);
bcostm 1:138e8076f348 102 uint32_t (*ITStatus)(uint16_t, uint32_t);
bcostm 1:138e8076f348 103 void (*ClearIT)(uint16_t, uint32_t);
bcostm 1:138e8076f348 104
bcostm 1:138e8076f348 105 }IO_DrvTypeDef;
bcostm 1:138e8076f348 106 /**
bcostm 1:138e8076f348 107 * @}
bcostm 1:138e8076f348 108 */
bcostm 1:138e8076f348 109
bcostm 1:138e8076f348 110 /**
bcostm 1:138e8076f348 111 * @}
bcostm 1:138e8076f348 112 */
bcostm 1:138e8076f348 113
bcostm 1:138e8076f348 114 /**
bcostm 1:138e8076f348 115 * @}
bcostm 1:138e8076f348 116 */
bcostm 1:138e8076f348 117
bcostm 1:138e8076f348 118 /**
bcostm 1:138e8076f348 119 * @}
bcostm 1:138e8076f348 120 */
bcostm 1:138e8076f348 121
bcostm 1:138e8076f348 122 /**
bcostm 1:138e8076f348 123 * @}
bcostm 1:138e8076f348 124 */
bcostm 1:138e8076f348 125
bcostm 1:138e8076f348 126 #ifdef __cplusplus
bcostm 1:138e8076f348 127 }
bcostm 1:138e8076f348 128 #endif
bcostm 1:138e8076f348 129
bcostm 1:138e8076f348 130 #endif /* __IO_H */
bcostm 1:138e8076f348 131
bcostm 1:138e8076f348 132 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/