A simple 128x32 graphical LCD program to quickstart with LCD on ARM mbed IoT Starter Kit. This requires mbed Applciation Shield with FRDM-K64F platform.

Dependencies:   C12832

Committer:
tushki7
Date:
Sun Apr 12 15:45:52 2015 +0000
Revision:
1:eb68c94a8ee5
Parent:
0:60d829a0353a
A simple 128x32 LCD program with ARM mbed IoT Starter Kit;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tushki7 0:60d829a0353a 1 /**
tushki7 0:60d829a0353a 2 ******************************************************************************
tushki7 0:60d829a0353a 3 * @file stm32f4xx_hal.h
tushki7 0:60d829a0353a 4 * @author MCD Application Team
tushki7 0:60d829a0353a 5 * @version V1.1.0
tushki7 0:60d829a0353a 6 * @date 19-June-2014
tushki7 0:60d829a0353a 7 * @brief This file contains all the functions prototypes for the HAL
tushki7 0:60d829a0353a 8 * module driver.
tushki7 0:60d829a0353a 9 ******************************************************************************
tushki7 0:60d829a0353a 10 * @attention
tushki7 0:60d829a0353a 11 *
tushki7 0:60d829a0353a 12 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
tushki7 0:60d829a0353a 13 *
tushki7 0:60d829a0353a 14 * Redistribution and use in source and binary forms, with or without modification,
tushki7 0:60d829a0353a 15 * are permitted provided that the following conditions are met:
tushki7 0:60d829a0353a 16 * 1. Redistributions of source code must retain the above copyright notice,
tushki7 0:60d829a0353a 17 * this list of conditions and the following disclaimer.
tushki7 0:60d829a0353a 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
tushki7 0:60d829a0353a 19 * this list of conditions and the following disclaimer in the documentation
tushki7 0:60d829a0353a 20 * and/or other materials provided with the distribution.
tushki7 0:60d829a0353a 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
tushki7 0:60d829a0353a 22 * may be used to endorse or promote products derived from this software
tushki7 0:60d829a0353a 23 * without specific prior written permission.
tushki7 0:60d829a0353a 24 *
tushki7 0:60d829a0353a 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
tushki7 0:60d829a0353a 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
tushki7 0:60d829a0353a 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
tushki7 0:60d829a0353a 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
tushki7 0:60d829a0353a 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
tushki7 0:60d829a0353a 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
tushki7 0:60d829a0353a 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
tushki7 0:60d829a0353a 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
tushki7 0:60d829a0353a 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
tushki7 0:60d829a0353a 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
tushki7 0:60d829a0353a 35 *
tushki7 0:60d829a0353a 36 ******************************************************************************
tushki7 0:60d829a0353a 37 */
tushki7 0:60d829a0353a 38
tushki7 0:60d829a0353a 39 /* Define to prevent recursive inclusion -------------------------------------*/
tushki7 0:60d829a0353a 40 #ifndef __STM32F4xx_HAL_H
tushki7 0:60d829a0353a 41 #define __STM32F4xx_HAL_H
tushki7 0:60d829a0353a 42
tushki7 0:60d829a0353a 43 #ifdef __cplusplus
tushki7 0:60d829a0353a 44 extern "C" {
tushki7 0:60d829a0353a 45 #endif
tushki7 0:60d829a0353a 46
tushki7 0:60d829a0353a 47 /* Includes ------------------------------------------------------------------*/
tushki7 0:60d829a0353a 48 #include "stm32f4xx_hal_conf.h"
tushki7 0:60d829a0353a 49
tushki7 0:60d829a0353a 50 /** @addtogroup STM32F4xx_HAL_Driver
tushki7 0:60d829a0353a 51 * @{
tushki7 0:60d829a0353a 52 */
tushki7 0:60d829a0353a 53
tushki7 0:60d829a0353a 54 /** @addtogroup HAL
tushki7 0:60d829a0353a 55 * @{
tushki7 0:60d829a0353a 56 */
tushki7 0:60d829a0353a 57
tushki7 0:60d829a0353a 58 /* Exported types ------------------------------------------------------------*/
tushki7 0:60d829a0353a 59 /* Exported constants --------------------------------------------------------*/
tushki7 0:60d829a0353a 60 /* Exported macro ------------------------------------------------------------*/
tushki7 0:60d829a0353a 61
tushki7 0:60d829a0353a 62 /** @brief Freeze/Unfreeze Peripherals in Debug mode
tushki7 0:60d829a0353a 63 */
tushki7 0:60d829a0353a 64 #define __HAL_FREEZE_TIM2_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM2_STOP))
tushki7 0:60d829a0353a 65 #define __HAL_FREEZE_TIM3_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM3_STOP))
tushki7 0:60d829a0353a 66 #define __HAL_FREEZE_TIM4_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM4_STOP))
tushki7 0:60d829a0353a 67 #define __HAL_FREEZE_TIM5_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM5_STOP))
tushki7 0:60d829a0353a 68 #define __HAL_FREEZE_TIM6_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM6_STOP))
tushki7 0:60d829a0353a 69 #define __HAL_FREEZE_TIM7_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM7_STOP))
tushki7 0:60d829a0353a 70 #define __HAL_FREEZE_TIM12_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM12_STOP))
tushki7 0:60d829a0353a 71 #define __HAL_FREEZE_TIM13_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM13_STOP))
tushki7 0:60d829a0353a 72 #define __HAL_FREEZE_TIM14_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM14_STOP))
tushki7 0:60d829a0353a 73 #define __HAL_FREEZE_RTC_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_RTC_STOP))
tushki7 0:60d829a0353a 74 #define __HAL_FREEZE_WWDG_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_WWDG_STOP))
tushki7 0:60d829a0353a 75 #define __HAL_FREEZE_IWDG_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_IWDG_STOP))
tushki7 0:60d829a0353a 76 #define __HAL_FREEZE_I2C1_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT))
tushki7 0:60d829a0353a 77 #define __HAL_FREEZE_I2C2_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT))
tushki7 0:60d829a0353a 78 #define __HAL_FREEZE_I2C3_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT))
tushki7 0:60d829a0353a 79 #define __HAL_FREEZE_CAN1_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_CAN1_STOP))
tushki7 0:60d829a0353a 80 #define __HAL_FREEZE_CAN2_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_CAN2_STOP))
tushki7 0:60d829a0353a 81 #define __HAL_FREEZE_TIM1_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM1_STOP))
tushki7 0:60d829a0353a 82 #define __HAL_FREEZE_TIM8_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM8_STOP))
tushki7 0:60d829a0353a 83 #define __HAL_FREEZE_TIM9_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM9_STOP))
tushki7 0:60d829a0353a 84 #define __HAL_FREEZE_TIM10_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM10_STOP))
tushki7 0:60d829a0353a 85 #define __HAL_FREEZE_TIM11_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM11_STOP))
tushki7 0:60d829a0353a 86
tushki7 0:60d829a0353a 87 #define __HAL_UNFREEZE_TIM2_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM2_STOP))
tushki7 0:60d829a0353a 88 #define __HAL_UNFREEZE_TIM3_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM3_STOP))
tushki7 0:60d829a0353a 89 #define __HAL_UNFREEZE_TIM4_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM4_STOP))
tushki7 0:60d829a0353a 90 #define __HAL_UNFREEZE_TIM5_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM5_STOP))
tushki7 0:60d829a0353a 91 #define __HAL_UNFREEZE_TIM6_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM6_STOP))
tushki7 0:60d829a0353a 92 #define __HAL_UNFREEZE_TIM7_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM7_STOP))
tushki7 0:60d829a0353a 93 #define __HAL_UNFREEZE_TIM12_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM12_STOP))
tushki7 0:60d829a0353a 94 #define __HAL_UNFREEZE_TIM13_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM13_STOP))
tushki7 0:60d829a0353a 95 #define __HAL_UNFREEZE_TIM14_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM14_STOP))
tushki7 0:60d829a0353a 96 #define __HAL_UNFREEZE_RTC_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_RTC_STOP))
tushki7 0:60d829a0353a 97 #define __HAL_UNFREEZE_WWDG_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_WWDG_STOP))
tushki7 0:60d829a0353a 98 #define __HAL_UNFREEZE_IWDG_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_IWDG_STOP))
tushki7 0:60d829a0353a 99 #define __HAL_UNFREEZE_I2C1_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT))
tushki7 0:60d829a0353a 100 #define __HAL_UNFREEZE_I2C2_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT))
tushki7 0:60d829a0353a 101 #define __HAL_UNFREEZE_I2C3_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT))
tushki7 0:60d829a0353a 102 #define __HAL_UNFREEZE_CAN1_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_CAN1_STOP))
tushki7 0:60d829a0353a 103 #define __HAL_UNFREEZE_CAN2_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_CAN2_STOP))
tushki7 0:60d829a0353a 104 #define __HAL_UNFREEZE_TIM1_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM1_STOP))
tushki7 0:60d829a0353a 105 #define __HAL_UNFREEZE_TIM8_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM8_STOP))
tushki7 0:60d829a0353a 106 #define __HAL_UNFREEZE_TIM9_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM9_STOP))
tushki7 0:60d829a0353a 107 #define __HAL_UNFREEZE_TIM10_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM10_STOP))
tushki7 0:60d829a0353a 108 #define __HAL_UNFREEZE_TIM11_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM11_STOP))
tushki7 0:60d829a0353a 109
tushki7 0:60d829a0353a 110 /** @brief Main Flash memory mapped at 0x00000000
tushki7 0:60d829a0353a 111 */
tushki7 0:60d829a0353a 112 #define __HAL_REMAPMEMORY_FLASH() (SYSCFG->MEMRMP &= ~(SYSCFG_MEMRMP_MEM_MODE))
tushki7 0:60d829a0353a 113
tushki7 0:60d829a0353a 114 /** @brief System Flash memory mapped at 0x00000000
tushki7 0:60d829a0353a 115 */
tushki7 0:60d829a0353a 116 #define __HAL_REMAPMEMORY_SYSTEMFLASH() do {SYSCFG->MEMRMP &= ~(SYSCFG_MEMRMP_MEM_MODE);\
tushki7 0:60d829a0353a 117 SYSCFG->MEMRMP |= SYSCFG_MEMRMP_MEM_MODE_0;\
tushki7 0:60d829a0353a 118 }while(0);
tushki7 0:60d829a0353a 119
tushki7 0:60d829a0353a 120 /** @brief Embedded SRAM mapped at 0x00000000
tushki7 0:60d829a0353a 121 */
tushki7 0:60d829a0353a 122 #define __HAL_REMAPMEMORY_SRAM() do {SYSCFG->MEMRMP &= ~(SYSCFG_MEMRMP_MEM_MODE);\
tushki7 0:60d829a0353a 123 SYSCFG->MEMRMP |= (SYSCFG_MEMRMP_MEM_MODE_0 | SYSCFG_MEMRMP_MEM_MODE_1);\
tushki7 0:60d829a0353a 124 }while(0);
tushki7 0:60d829a0353a 125
tushki7 0:60d829a0353a 126 #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx)|| defined(STM32F417xx)
tushki7 0:60d829a0353a 127 /** @brief FSMC Bank1 (NOR/PSRAM 1 and 2) mapped at 0x00000000
tushki7 0:60d829a0353a 128 */
tushki7 0:60d829a0353a 129 #define __HAL_REMAPMEMORY_FSMC() do {SYSCFG->MEMRMP &= ~(SYSCFG_MEMRMP_MEM_MODE);\
tushki7 0:60d829a0353a 130 SYSCFG->MEMRMP |= (SYSCFG_MEMRMP_MEM_MODE_1);\
tushki7 0:60d829a0353a 131 }while(0);
tushki7 0:60d829a0353a 132 #endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx */
tushki7 0:60d829a0353a 133
tushki7 0:60d829a0353a 134 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx)
tushki7 0:60d829a0353a 135 /** @brief FMC Bank1 (NOR/PSRAM 1 and 2) mapped at 0x00000000
tushki7 0:60d829a0353a 136 */
tushki7 0:60d829a0353a 137 #define __HAL_REMAPMEMORY_FMC() do {SYSCFG->MEMRMP &= ~(SYSCFG_MEMRMP_MEM_MODE);\
tushki7 0:60d829a0353a 138 SYSCFG->MEMRMP |= (SYSCFG_MEMRMP_MEM_MODE_1);\
tushki7 0:60d829a0353a 139 }while(0);
tushki7 0:60d829a0353a 140
tushki7 0:60d829a0353a 141 /** @brief FMC/SDRAM Bank 1 and 2 mapped at 0x00000000
tushki7 0:60d829a0353a 142 */
tushki7 0:60d829a0353a 143 #define __HAL_REMAPMEMORY_FMC_SDRAM() do {SYSCFG->MEMRMP &= ~(SYSCFG_MEMRMP_MEM_MODE);\
tushki7 0:60d829a0353a 144 SYSCFG->MEMRMP |= (SYSCFG_MEMRMP_MEM_MODE_2);\
tushki7 0:60d829a0353a 145 }while(0);
tushki7 0:60d829a0353a 146 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
tushki7 0:60d829a0353a 147
tushki7 0:60d829a0353a 148 /* Exported functions --------------------------------------------------------*/
tushki7 0:60d829a0353a 149
tushki7 0:60d829a0353a 150 /* Initialization and de-initialization functions ******************************/
tushki7 0:60d829a0353a 151 HAL_StatusTypeDef HAL_Init(void);
tushki7 0:60d829a0353a 152 HAL_StatusTypeDef HAL_DeInit(void);
tushki7 0:60d829a0353a 153 void HAL_MspInit(void);
tushki7 0:60d829a0353a 154 void HAL_MspDeInit(void);
tushki7 0:60d829a0353a 155 HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority);
tushki7 0:60d829a0353a 156
tushki7 0:60d829a0353a 157 /* Peripheral Control functions ************************************************/
tushki7 0:60d829a0353a 158 void HAL_IncTick(void);
tushki7 0:60d829a0353a 159 void HAL_Delay(__IO uint32_t Delay);
tushki7 0:60d829a0353a 160 uint32_t HAL_GetTick(void);
tushki7 0:60d829a0353a 161 void HAL_SuspendTick(void);
tushki7 0:60d829a0353a 162 void HAL_ResumeTick(void);
tushki7 0:60d829a0353a 163 uint32_t HAL_GetHalVersion(void);
tushki7 0:60d829a0353a 164 uint32_t HAL_GetREVID(void);
tushki7 0:60d829a0353a 165 uint32_t HAL_GetDEVID(void);
tushki7 0:60d829a0353a 166 void HAL_EnableDBGSleepMode(void);
tushki7 0:60d829a0353a 167 void HAL_DisableDBGSleepMode(void);
tushki7 0:60d829a0353a 168 void HAL_EnableDBGStopMode(void);
tushki7 0:60d829a0353a 169 void HAL_DisableDBGStopMode(void);
tushki7 0:60d829a0353a 170 void HAL_EnableDBGStandbyMode(void);
tushki7 0:60d829a0353a 171 void HAL_DisableDBGStandbyMode(void);
tushki7 0:60d829a0353a 172 void HAL_EnableCompensationCell(void);
tushki7 0:60d829a0353a 173 void HAL_DisableCompensationCell(void);
tushki7 0:60d829a0353a 174 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx)|| defined(STM32F439xx)
tushki7 0:60d829a0353a 175 void HAL_EnableMemorySwappingBank(void);
tushki7 0:60d829a0353a 176 void HAL_DisableMemorySwappingBank(void);
tushki7 0:60d829a0353a 177 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
tushki7 0:60d829a0353a 178
tushki7 0:60d829a0353a 179
tushki7 0:60d829a0353a 180 /**
tushki7 0:60d829a0353a 181 * @}
tushki7 0:60d829a0353a 182 */
tushki7 0:60d829a0353a 183
tushki7 0:60d829a0353a 184 /**
tushki7 0:60d829a0353a 185 * @}
tushki7 0:60d829a0353a 186 */
tushki7 0:60d829a0353a 187
tushki7 0:60d829a0353a 188 #ifdef __cplusplus
tushki7 0:60d829a0353a 189 }
tushki7 0:60d829a0353a 190 #endif
tushki7 0:60d829a0353a 191
tushki7 0:60d829a0353a 192 #endif /* __STM32F4xx_HAL_H */
tushki7 0:60d829a0353a 193
tushki7 0:60d829a0353a 194 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/