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_F070RB/hal_tick.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 hal_tick.h |
tushki7 | 0:60d829a0353a | 4 | * @author MCD Application Team |
tushki7 | 0:60d829a0353a | 5 | * @brief Initialization of HAL tick |
tushki7 | 0:60d829a0353a | 6 | ****************************************************************************** |
tushki7 | 0:60d829a0353a | 7 | * @attention |
tushki7 | 0:60d829a0353a | 8 | * |
tushki7 | 0:60d829a0353a | 9 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
tushki7 | 0:60d829a0353a | 10 | * |
tushki7 | 0:60d829a0353a | 11 | * Redistribution and use in source and binary forms, with or without modification, |
tushki7 | 0:60d829a0353a | 12 | * are permitted provided that the following conditions are met: |
tushki7 | 0:60d829a0353a | 13 | * 1. Redistributions of source code must retain the above copyright notice, |
tushki7 | 0:60d829a0353a | 14 | * this list of conditions and the following disclaimer. |
tushki7 | 0:60d829a0353a | 15 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
tushki7 | 0:60d829a0353a | 16 | * this list of conditions and the following disclaimer in the documentation |
tushki7 | 0:60d829a0353a | 17 | * and/or other materials provided with the distribution. |
tushki7 | 0:60d829a0353a | 18 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
tushki7 | 0:60d829a0353a | 19 | * may be used to endorse or promote products derived from this software |
tushki7 | 0:60d829a0353a | 20 | * without specific prior written permission. |
tushki7 | 0:60d829a0353a | 21 | * |
tushki7 | 0:60d829a0353a | 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
tushki7 | 0:60d829a0353a | 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
tushki7 | 0:60d829a0353a | 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
tushki7 | 0:60d829a0353a | 25 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
tushki7 | 0:60d829a0353a | 26 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
tushki7 | 0:60d829a0353a | 27 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
tushki7 | 0:60d829a0353a | 28 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
tushki7 | 0:60d829a0353a | 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
tushki7 | 0:60d829a0353a | 30 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
tushki7 | 0:60d829a0353a | 31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
tushki7 | 0:60d829a0353a | 32 | * |
tushki7 | 0:60d829a0353a | 33 | ****************************************************************************** |
tushki7 | 0:60d829a0353a | 34 | */ |
tushki7 | 0:60d829a0353a | 35 | #ifndef __HAL_TICK_H |
tushki7 | 0:60d829a0353a | 36 | #define __HAL_TICK_H |
tushki7 | 0:60d829a0353a | 37 | |
tushki7 | 0:60d829a0353a | 38 | #ifdef __cplusplus |
tushki7 | 0:60d829a0353a | 39 | extern "C" { |
tushki7 | 0:60d829a0353a | 40 | #endif |
tushki7 | 0:60d829a0353a | 41 | |
tushki7 | 0:60d829a0353a | 42 | #include "stm32f0xx.h" |
tushki7 | 0:60d829a0353a | 43 | #include "cmsis_nvic.h" |
tushki7 | 0:60d829a0353a | 44 | |
tushki7 | 0:60d829a0353a | 45 | #define TIM_MST TIM1 |
tushki7 | 0:60d829a0353a | 46 | #define TIM_MST_UP_IRQ TIM1_BRK_UP_TRG_COM_IRQn |
tushki7 | 0:60d829a0353a | 47 | #define TIM_MST_OC_IRQ TIM1_CC_IRQn |
tushki7 | 0:60d829a0353a | 48 | #define TIM_MST_RCC __TIM1_CLK_ENABLE() |
tushki7 | 0:60d829a0353a | 49 | |
tushki7 | 0:60d829a0353a | 50 | #define TIM_MST_RESET_ON __TIM1_FORCE_RESET() |
tushki7 | 0:60d829a0353a | 51 | #define TIM_MST_RESET_OFF __TIM1_RELEASE_RESET() |
tushki7 | 0:60d829a0353a | 52 | |
tushki7 | 0:60d829a0353a | 53 | #define HAL_TICK_DELAY (1000) // 1 ms |
tushki7 | 0:60d829a0353a | 54 | |
tushki7 | 0:60d829a0353a | 55 | #ifdef __cplusplus |
tushki7 | 0:60d829a0353a | 56 | } |
tushki7 | 0:60d829a0353a | 57 | #endif |
tushki7 | 0:60d829a0353a | 58 | |
tushki7 | 0:60d829a0353a | 59 | #endif // __HAL_TICK_H |
tushki7 | 0:60d829a0353a | 60 | |
tushki7 | 0:60d829a0353a | 61 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |