mbed(SerialHalfDuplex入り)
Fork of mbed by
TARGET_NUCLEO_F103RB/hal_tick.h@98:01a414ca7d6d, 2015-04-08 (annotated)
- Committer:
- yusuke_kyo
- Date:
- Wed Apr 08 08:04:18 2015 +0000
- Revision:
- 98:01a414ca7d6d
- Parent:
- 96:487b796308b0
remove SerialHalfDuplex.h
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 96:487b796308b0 | 1 | /** |
Kojto | 96:487b796308b0 | 2 | ****************************************************************************** |
Kojto | 96:487b796308b0 | 3 | * @file hal_tick.h |
Kojto | 96:487b796308b0 | 4 | * @author MCD Application Team |
Kojto | 96:487b796308b0 | 5 | * @brief Initialization of HAL tick |
Kojto | 96:487b796308b0 | 6 | ****************************************************************************** |
Kojto | 96:487b796308b0 | 7 | * @attention |
Kojto | 96:487b796308b0 | 8 | * |
Kojto | 96:487b796308b0 | 9 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
Kojto | 96:487b796308b0 | 10 | * |
Kojto | 96:487b796308b0 | 11 | * Redistribution and use in source and binary forms, with or without modification, |
Kojto | 96:487b796308b0 | 12 | * are permitted provided that the following conditions are met: |
Kojto | 96:487b796308b0 | 13 | * 1. Redistributions of source code must retain the above copyright notice, |
Kojto | 96:487b796308b0 | 14 | * this list of conditions and the following disclaimer. |
Kojto | 96:487b796308b0 | 15 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
Kojto | 96:487b796308b0 | 16 | * this list of conditions and the following disclaimer in the documentation |
Kojto | 96:487b796308b0 | 17 | * and/or other materials provided with the distribution. |
Kojto | 96:487b796308b0 | 18 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
Kojto | 96:487b796308b0 | 19 | * may be used to endorse or promote products derived from this software |
Kojto | 96:487b796308b0 | 20 | * without specific prior written permission. |
Kojto | 96:487b796308b0 | 21 | * |
Kojto | 96:487b796308b0 | 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
Kojto | 96:487b796308b0 | 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
Kojto | 96:487b796308b0 | 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Kojto | 96:487b796308b0 | 25 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
Kojto | 96:487b796308b0 | 26 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
Kojto | 96:487b796308b0 | 27 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
Kojto | 96:487b796308b0 | 28 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
Kojto | 96:487b796308b0 | 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
Kojto | 96:487b796308b0 | 30 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
Kojto | 96:487b796308b0 | 31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Kojto | 96:487b796308b0 | 32 | * |
Kojto | 96:487b796308b0 | 33 | ****************************************************************************** |
Kojto | 96:487b796308b0 | 34 | */ |
Kojto | 96:487b796308b0 | 35 | #ifndef __HAL_TICK_H |
Kojto | 96:487b796308b0 | 36 | #define __HAL_TICK_H |
Kojto | 96:487b796308b0 | 37 | |
Kojto | 96:487b796308b0 | 38 | #ifdef __cplusplus |
Kojto | 96:487b796308b0 | 39 | extern "C" { |
Kojto | 96:487b796308b0 | 40 | #endif |
Kojto | 96:487b796308b0 | 41 | |
Kojto | 96:487b796308b0 | 42 | #include "stm32f1xx.h" |
Kojto | 96:487b796308b0 | 43 | #include "cmsis_nvic.h" |
Kojto | 96:487b796308b0 | 44 | |
Kojto | 96:487b796308b0 | 45 | #define TIM_MST TIM4 |
Kojto | 96:487b796308b0 | 46 | #define TIM_MST_IRQ TIM4_IRQn |
Kojto | 96:487b796308b0 | 47 | #define TIM_MST_RCC __TIM4_CLK_ENABLE() |
Kojto | 96:487b796308b0 | 48 | |
Kojto | 96:487b796308b0 | 49 | #define TIM_MST_RESET_ON __TIM4_FORCE_RESET() |
Kojto | 96:487b796308b0 | 50 | #define TIM_MST_RESET_OFF __TIM4_RELEASE_RESET() |
Kojto | 96:487b796308b0 | 51 | |
Kojto | 96:487b796308b0 | 52 | #define HAL_TICK_DELAY (1000) // 1 ms |
Kojto | 96:487b796308b0 | 53 | |
Kojto | 96:487b796308b0 | 54 | #ifdef __cplusplus |
Kojto | 96:487b796308b0 | 55 | } |
Kojto | 96:487b796308b0 | 56 | #endif |
Kojto | 96:487b796308b0 | 57 | |
Kojto | 96:487b796308b0 | 58 | #endif // __HAL_TICK_H |
Kojto | 96:487b796308b0 | 59 | |
Kojto | 96:487b796308b0 | 60 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |