Additional font macro

Dependents:   EspSerial

Committer:
SomeRandomBloke
Date:
Fri Feb 05 09:20:30 2016 +0000
Revision:
1:a6fd0931a9e9
Parent:
0:e1d164542663
Added additional font macro

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bcostm 0:e1d164542663 1 /**
bcostm 0:e1d164542663 2 ******************************************************************************
bcostm 0:e1d164542663 3 * @file io.h
bcostm 0:e1d164542663 4 * @author MCD Application Team
bcostm 0:e1d164542663 5 * @version V4.0.1
bcostm 0:e1d164542663 6 * @date 21-July-2015
bcostm 0:e1d164542663 7 * @brief This file contains all the functions prototypes for the IO driver.
bcostm 0:e1d164542663 8 ******************************************************************************
bcostm 0:e1d164542663 9 * @attention
bcostm 0:e1d164542663 10 *
bcostm 0:e1d164542663 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
bcostm 0:e1d164542663 12 *
bcostm 0:e1d164542663 13 * Redistribution and use in source and binary forms, with or without modification,
bcostm 0:e1d164542663 14 * are permitted provided that the following conditions are met:
bcostm 0:e1d164542663 15 * 1. Redistributions of source code must retain the above copyright notice,
bcostm 0:e1d164542663 16 * this list of conditions and the following disclaimer.
bcostm 0:e1d164542663 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
bcostm 0:e1d164542663 18 * this list of conditions and the following disclaimer in the documentation
bcostm 0:e1d164542663 19 * and/or other materials provided with the distribution.
bcostm 0:e1d164542663 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
bcostm 0:e1d164542663 21 * may be used to endorse or promote products derived from this software
bcostm 0:e1d164542663 22 * without specific prior written permission.
bcostm 0:e1d164542663 23 *
bcostm 0:e1d164542663 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
bcostm 0:e1d164542663 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
bcostm 0:e1d164542663 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
bcostm 0:e1d164542663 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
bcostm 0:e1d164542663 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
bcostm 0:e1d164542663 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
bcostm 0:e1d164542663 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
bcostm 0:e1d164542663 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
bcostm 0:e1d164542663 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
bcostm 0:e1d164542663 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
bcostm 0:e1d164542663 34 *
bcostm 0:e1d164542663 35 ******************************************************************************
bcostm 0:e1d164542663 36 */
bcostm 0:e1d164542663 37
bcostm 0:e1d164542663 38 /* Define to prevent recursive inclusion -------------------------------------*/
bcostm 0:e1d164542663 39 #ifndef __IO_H
bcostm 0:e1d164542663 40 #define __IO_H
bcostm 0:e1d164542663 41
bcostm 0:e1d164542663 42 #ifdef __cplusplus
bcostm 0:e1d164542663 43 extern "C" {
bcostm 0:e1d164542663 44 #endif
bcostm 0:e1d164542663 45
bcostm 0:e1d164542663 46 /* Includes ------------------------------------------------------------------*/
bcostm 0:e1d164542663 47 #include <stdint.h>
bcostm 0:e1d164542663 48
bcostm 0:e1d164542663 49 /** @addtogroup BSP
bcostm 0:e1d164542663 50 * @{
bcostm 0:e1d164542663 51 */
bcostm 0:e1d164542663 52
bcostm 0:e1d164542663 53 /** @addtogroup Components
bcostm 0:e1d164542663 54 * @{
bcostm 0:e1d164542663 55 */
bcostm 0:e1d164542663 56
bcostm 0:e1d164542663 57 /** @addtogroup IO
bcostm 0:e1d164542663 58 * @{
bcostm 0:e1d164542663 59 */
bcostm 0:e1d164542663 60
bcostm 0:e1d164542663 61 /** @defgroup IO_Exported_Types
bcostm 0:e1d164542663 62 * @{
bcostm 0:e1d164542663 63 */
bcostm 0:e1d164542663 64
bcostm 0:e1d164542663 65 /**
bcostm 0:e1d164542663 66 * @brief IO Bit SET and Bit RESET enumeration
bcostm 0:e1d164542663 67 */
bcostm 0:e1d164542663 68 typedef enum
bcostm 0:e1d164542663 69 {
bcostm 0:e1d164542663 70 IO_PIN_RESET = 0,
bcostm 0:e1d164542663 71 IO_PIN_SET
bcostm 0:e1d164542663 72 }IO_PinState;
bcostm 0:e1d164542663 73
bcostm 0:e1d164542663 74 typedef enum
bcostm 0:e1d164542663 75 {
bcostm 0:e1d164542663 76 IO_MODE_INPUT = 0, /* input floating */
bcostm 0:e1d164542663 77 IO_MODE_OUTPUT, /* output Push Pull */
bcostm 0:e1d164542663 78 IO_MODE_IT_RISING_EDGE, /* float input - irq detect on rising edge */
bcostm 0:e1d164542663 79 IO_MODE_IT_FALLING_EDGE, /* float input - irq detect on falling edge */
bcostm 0:e1d164542663 80 IO_MODE_IT_LOW_LEVEL, /* float input - irq detect on low level */
bcostm 0:e1d164542663 81 IO_MODE_IT_HIGH_LEVEL, /* float input - irq detect on high level */
bcostm 0:e1d164542663 82 /* following modes only available on MFX*/
bcostm 0:e1d164542663 83 IO_MODE_ANALOG, /* analog mode */
bcostm 0:e1d164542663 84 IO_MODE_OFF, /* when pin isn't used*/
bcostm 0:e1d164542663 85 IO_MODE_INPUT_PU, /* input with internal pull up resistor */
bcostm 0:e1d164542663 86 IO_MODE_INPUT_PD, /* input with internal pull down resistor */
bcostm 0:e1d164542663 87 IO_MODE_OUTPUT_OD, /* Open Drain output without internal resistor */
bcostm 0:e1d164542663 88 IO_MODE_OUTPUT_OD_PU, /* Open Drain output with internal pullup resistor */
bcostm 0:e1d164542663 89 IO_MODE_OUTPUT_OD_PD, /* Open Drain output with internal pulldown resistor */
bcostm 0:e1d164542663 90 IO_MODE_OUTPUT_PP, /* PushPull output without internal resistor */
bcostm 0:e1d164542663 91 IO_MODE_OUTPUT_PP_PU, /* PushPull output with internal pullup resistor */
bcostm 0:e1d164542663 92 IO_MODE_OUTPUT_PP_PD, /* PushPull output with internal pulldown resistor */
bcostm 0:e1d164542663 93 IO_MODE_IT_RISING_EDGE_PU, /* push up resistor input - irq on rising edge */
bcostm 0:e1d164542663 94 IO_MODE_IT_RISING_EDGE_PD, /* push dw resistor input - irq on rising edge */
bcostm 0:e1d164542663 95 IO_MODE_IT_FALLING_EDGE_PU, /* push up resistor input - irq on falling edge */
bcostm 0:e1d164542663 96 IO_MODE_IT_FALLING_EDGE_PD, /* push dw resistor input - irq on falling edge */
bcostm 0:e1d164542663 97 IO_MODE_IT_LOW_LEVEL_PU, /* push up resistor input - irq detect on low level */
bcostm 0:e1d164542663 98 IO_MODE_IT_LOW_LEVEL_PD, /* push dw resistor input - irq detect on low level */
bcostm 0:e1d164542663 99 IO_MODE_IT_HIGH_LEVEL_PU, /* push up resistor input - irq detect on high level */
bcostm 0:e1d164542663 100 IO_MODE_IT_HIGH_LEVEL_PD, /* push dw resistor input - irq detect on high level */
bcostm 0:e1d164542663 101
bcostm 0:e1d164542663 102 }IO_ModeTypedef;
bcostm 0:e1d164542663 103
bcostm 0:e1d164542663 104 /** @defgroup IO_Driver_structure IO Driver structure
bcostm 0:e1d164542663 105 * @{
bcostm 0:e1d164542663 106 */
bcostm 0:e1d164542663 107 typedef struct
bcostm 0:e1d164542663 108 {
bcostm 0:e1d164542663 109 void (*Init)(uint16_t);
bcostm 0:e1d164542663 110 uint16_t (*ReadID)(uint16_t);
bcostm 0:e1d164542663 111 void (*Reset)(uint16_t);
bcostm 0:e1d164542663 112
bcostm 0:e1d164542663 113 void (*Start)(uint16_t, uint32_t);
bcostm 0:e1d164542663 114 uint8_t (*Config)(uint16_t, uint32_t, IO_ModeTypedef);
bcostm 0:e1d164542663 115 void (*WritePin)(uint16_t, uint32_t, uint8_t);
bcostm 0:e1d164542663 116 uint32_t (*ReadPin)(uint16_t, uint32_t);
bcostm 0:e1d164542663 117
bcostm 0:e1d164542663 118 void (*EnableIT)(uint16_t);
bcostm 0:e1d164542663 119 void (*DisableIT)(uint16_t);
bcostm 0:e1d164542663 120 uint32_t (*ITStatus)(uint16_t, uint32_t);
bcostm 0:e1d164542663 121 void (*ClearIT)(uint16_t, uint32_t);
bcostm 0:e1d164542663 122
bcostm 0:e1d164542663 123 }IO_DrvTypeDef;
bcostm 0:e1d164542663 124 /**
bcostm 0:e1d164542663 125 * @}
bcostm 0:e1d164542663 126 */
bcostm 0:e1d164542663 127
bcostm 0:e1d164542663 128 /**
bcostm 0:e1d164542663 129 * @}
bcostm 0:e1d164542663 130 */
bcostm 0:e1d164542663 131
bcostm 0:e1d164542663 132 /**
bcostm 0:e1d164542663 133 * @}
bcostm 0:e1d164542663 134 */
bcostm 0:e1d164542663 135
bcostm 0:e1d164542663 136 /**
bcostm 0:e1d164542663 137 * @}
bcostm 0:e1d164542663 138 */
bcostm 0:e1d164542663 139
bcostm 0:e1d164542663 140 /**
bcostm 0:e1d164542663 141 * @}
bcostm 0:e1d164542663 142 */
bcostm 0:e1d164542663 143
bcostm 0:e1d164542663 144 #ifdef __cplusplus
bcostm 0:e1d164542663 145 }
bcostm 0:e1d164542663 146 #endif
bcostm 0:e1d164542663 147
bcostm 0:e1d164542663 148 #endif /* __IO_H */
bcostm 0:e1d164542663 149
bcostm 0:e1d164542663 150 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/