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.
mbed/TARGET_NUCLEO_F411RE/stm32f4xx_hal_crc.h@1:eb68c94a8ee5, 2015-04-12 (annotated)
- 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?
User | Revision | Line number | New contents of line |
---|---|---|---|
tushki7 | 0:60d829a0353a | 1 | /** |
tushki7 | 0:60d829a0353a | 2 | ****************************************************************************** |
tushki7 | 0:60d829a0353a | 3 | * @file stm32f4xx_hal_crc.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 Header file of CRC HAL module. |
tushki7 | 0:60d829a0353a | 8 | ****************************************************************************** |
tushki7 | 0:60d829a0353a | 9 | * @attention |
tushki7 | 0:60d829a0353a | 10 | * |
tushki7 | 0:60d829a0353a | 11 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
tushki7 | 0:60d829a0353a | 12 | * |
tushki7 | 0:60d829a0353a | 13 | * Redistribution and use in source and binary forms, with or without modification, |
tushki7 | 0:60d829a0353a | 14 | * are permitted provided that the following conditions are met: |
tushki7 | 0:60d829a0353a | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
tushki7 | 0:60d829a0353a | 16 | * this list of conditions and the following disclaimer. |
tushki7 | 0:60d829a0353a | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
tushki7 | 0:60d829a0353a | 18 | * this list of conditions and the following disclaimer in the documentation |
tushki7 | 0:60d829a0353a | 19 | * and/or other materials provided with the distribution. |
tushki7 | 0:60d829a0353a | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
tushki7 | 0:60d829a0353a | 21 | * may be used to endorse or promote products derived from this software |
tushki7 | 0:60d829a0353a | 22 | * without specific prior written permission. |
tushki7 | 0:60d829a0353a | 23 | * |
tushki7 | 0:60d829a0353a | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
tushki7 | 0:60d829a0353a | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
tushki7 | 0:60d829a0353a | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
tushki7 | 0:60d829a0353a | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
tushki7 | 0:60d829a0353a | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
tushki7 | 0:60d829a0353a | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
tushki7 | 0:60d829a0353a | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
tushki7 | 0:60d829a0353a | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
tushki7 | 0:60d829a0353a | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
tushki7 | 0:60d829a0353a | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
tushki7 | 0:60d829a0353a | 34 | * |
tushki7 | 0:60d829a0353a | 35 | ****************************************************************************** |
tushki7 | 0:60d829a0353a | 36 | */ |
tushki7 | 0:60d829a0353a | 37 | |
tushki7 | 0:60d829a0353a | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
tushki7 | 0:60d829a0353a | 39 | #ifndef __STM32F4xx_HAL_CRC_H |
tushki7 | 0:60d829a0353a | 40 | #define __STM32F4xx_HAL_CRC_H |
tushki7 | 0:60d829a0353a | 41 | |
tushki7 | 0:60d829a0353a | 42 | #ifdef __cplusplus |
tushki7 | 0:60d829a0353a | 43 | extern "C" { |
tushki7 | 0:60d829a0353a | 44 | #endif |
tushki7 | 0:60d829a0353a | 45 | |
tushki7 | 0:60d829a0353a | 46 | /* Includes ------------------------------------------------------------------*/ |
tushki7 | 0:60d829a0353a | 47 | #include "stm32f4xx_hal_def.h" |
tushki7 | 0:60d829a0353a | 48 | |
tushki7 | 0:60d829a0353a | 49 | /** @addtogroup STM32F4xx_HAL_Driver |
tushki7 | 0:60d829a0353a | 50 | * @{ |
tushki7 | 0:60d829a0353a | 51 | */ |
tushki7 | 0:60d829a0353a | 52 | |
tushki7 | 0:60d829a0353a | 53 | /** @addtogroup CRC |
tushki7 | 0:60d829a0353a | 54 | * @{ |
tushki7 | 0:60d829a0353a | 55 | */ |
tushki7 | 0:60d829a0353a | 56 | |
tushki7 | 0:60d829a0353a | 57 | /* Exported types ------------------------------------------------------------*/ |
tushki7 | 0:60d829a0353a | 58 | |
tushki7 | 0:60d829a0353a | 59 | /** |
tushki7 | 0:60d829a0353a | 60 | * @brief CRC HAL State Structure definition |
tushki7 | 0:60d829a0353a | 61 | */ |
tushki7 | 0:60d829a0353a | 62 | typedef enum |
tushki7 | 0:60d829a0353a | 63 | { |
tushki7 | 0:60d829a0353a | 64 | HAL_CRC_STATE_RESET = 0x00, /*!< CRC not yet initialized or disabled */ |
tushki7 | 0:60d829a0353a | 65 | HAL_CRC_STATE_READY = 0x01, /*!< CRC initialized and ready for use */ |
tushki7 | 0:60d829a0353a | 66 | HAL_CRC_STATE_BUSY = 0x02, /*!< CRC internal process is ongoing */ |
tushki7 | 0:60d829a0353a | 67 | HAL_CRC_STATE_TIMEOUT = 0x03, /*!< CRC timeout state */ |
tushki7 | 0:60d829a0353a | 68 | HAL_CRC_STATE_ERROR = 0x04 /*!< CRC error state */ |
tushki7 | 0:60d829a0353a | 69 | |
tushki7 | 0:60d829a0353a | 70 | }HAL_CRC_StateTypeDef; |
tushki7 | 0:60d829a0353a | 71 | |
tushki7 | 0:60d829a0353a | 72 | /** |
tushki7 | 0:60d829a0353a | 73 | * @brief CRC handle Structure definition |
tushki7 | 0:60d829a0353a | 74 | */ |
tushki7 | 0:60d829a0353a | 75 | typedef struct |
tushki7 | 0:60d829a0353a | 76 | { |
tushki7 | 0:60d829a0353a | 77 | CRC_TypeDef *Instance; /*!< Register base address */ |
tushki7 | 0:60d829a0353a | 78 | |
tushki7 | 0:60d829a0353a | 79 | HAL_LockTypeDef Lock; /*!< CRC locking object */ |
tushki7 | 0:60d829a0353a | 80 | |
tushki7 | 0:60d829a0353a | 81 | __IO HAL_CRC_StateTypeDef State; /*!< CRC communication state */ |
tushki7 | 0:60d829a0353a | 82 | |
tushki7 | 0:60d829a0353a | 83 | }CRC_HandleTypeDef; |
tushki7 | 0:60d829a0353a | 84 | |
tushki7 | 0:60d829a0353a | 85 | /* Exported constants --------------------------------------------------------*/ |
tushki7 | 0:60d829a0353a | 86 | /* Exported macro ------------------------------------------------------------*/ |
tushki7 | 0:60d829a0353a | 87 | |
tushki7 | 0:60d829a0353a | 88 | /** @brief Reset CRC handle state |
tushki7 | 0:60d829a0353a | 89 | * @param __HANDLE__: CRC handle |
tushki7 | 0:60d829a0353a | 90 | * @retval None |
tushki7 | 0:60d829a0353a | 91 | */ |
tushki7 | 0:60d829a0353a | 92 | #define __HAL_CRC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_CRC_STATE_RESET) |
tushki7 | 0:60d829a0353a | 93 | |
tushki7 | 0:60d829a0353a | 94 | /** |
tushki7 | 0:60d829a0353a | 95 | * @brief Resets CRC Data Register. |
tushki7 | 0:60d829a0353a | 96 | * @param __HANDLE__: CRC handle |
tushki7 | 0:60d829a0353a | 97 | * @retval None |
tushki7 | 0:60d829a0353a | 98 | */ |
tushki7 | 0:60d829a0353a | 99 | #define __HAL_CRC_DR_RESET(__HANDLE__) ((__HANDLE__)->Instance->CR |= CRC_CR_RESET) |
tushki7 | 0:60d829a0353a | 100 | |
tushki7 | 0:60d829a0353a | 101 | /** |
tushki7 | 0:60d829a0353a | 102 | * @brief Stores a 8-bit data in the Independent Data(ID) register. |
tushki7 | 0:60d829a0353a | 103 | * @param __HANDLE__: CRC handle |
tushki7 | 0:60d829a0353a | 104 | * @param __VALUE: 8-bit value to be stored in the ID register |
tushki7 | 0:60d829a0353a | 105 | * @retval None |
tushki7 | 0:60d829a0353a | 106 | */ |
tushki7 | 0:60d829a0353a | 107 | #define __HAL_CRC_SET_IDR(__HANDLE__, __VALUE__) (MODIFY_REG((__HANDLE__)->Instance->IDR, CRC_IDR_IDR, (__VALUE__)) |
tushki7 | 0:60d829a0353a | 108 | |
tushki7 | 0:60d829a0353a | 109 | /** |
tushki7 | 0:60d829a0353a | 110 | * @brief Returns the 8-bit data stored in the Independent Data(ID) register. |
tushki7 | 0:60d829a0353a | 111 | * @param __HANDLE__: CRC handle |
tushki7 | 0:60d829a0353a | 112 | * @retval 8-bit value of the ID register |
tushki7 | 0:60d829a0353a | 113 | */ |
tushki7 | 0:60d829a0353a | 114 | #define __HAL_CRC_GET_IDR(__HANDLE__) (((__HANDLE__)->Instance->IDR) & CRC_IDR_IDR) |
tushki7 | 0:60d829a0353a | 115 | |
tushki7 | 0:60d829a0353a | 116 | /* Exported functions --------------------------------------------------------*/ |
tushki7 | 0:60d829a0353a | 117 | |
tushki7 | 0:60d829a0353a | 118 | /* Initialization/de-initialization functions **********************************/ |
tushki7 | 0:60d829a0353a | 119 | HAL_StatusTypeDef HAL_CRC_Init(CRC_HandleTypeDef *hcrc); |
tushki7 | 0:60d829a0353a | 120 | HAL_StatusTypeDef HAL_CRC_DeInit (CRC_HandleTypeDef *hcrc); |
tushki7 | 0:60d829a0353a | 121 | void HAL_CRC_MspInit(CRC_HandleTypeDef *hcrc); |
tushki7 | 0:60d829a0353a | 122 | void HAL_CRC_MspDeInit(CRC_HandleTypeDef *hcrc); |
tushki7 | 0:60d829a0353a | 123 | |
tushki7 | 0:60d829a0353a | 124 | /* Peripheral Control functions ************************************************/ |
tushki7 | 0:60d829a0353a | 125 | uint32_t HAL_CRC_Accumulate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t BufferLength); |
tushki7 | 0:60d829a0353a | 126 | uint32_t HAL_CRC_Calculate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t BufferLength); |
tushki7 | 0:60d829a0353a | 127 | |
tushki7 | 0:60d829a0353a | 128 | /* Peripheral State functions **************************************************/ |
tushki7 | 0:60d829a0353a | 129 | HAL_CRC_StateTypeDef HAL_CRC_GetState(CRC_HandleTypeDef *hcrc); |
tushki7 | 0:60d829a0353a | 130 | |
tushki7 | 0:60d829a0353a | 131 | /** |
tushki7 | 0:60d829a0353a | 132 | * @} |
tushki7 | 0:60d829a0353a | 133 | */ |
tushki7 | 0:60d829a0353a | 134 | |
tushki7 | 0:60d829a0353a | 135 | /** |
tushki7 | 0:60d829a0353a | 136 | * @} |
tushki7 | 0:60d829a0353a | 137 | */ |
tushki7 | 0:60d829a0353a | 138 | |
tushki7 | 0:60d829a0353a | 139 | #ifdef __cplusplus |
tushki7 | 0:60d829a0353a | 140 | } |
tushki7 | 0:60d829a0353a | 141 | #endif |
tushki7 | 0:60d829a0353a | 142 | |
tushki7 | 0:60d829a0353a | 143 | #endif /* __STM32F4xx_HAL_CRC_H */ |
tushki7 | 0:60d829a0353a | 144 | |
tushki7 | 0:60d829a0353a | 145 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |