Initial commit

Dependencies:   FastPWM

Committer:
lypinator
Date:
Wed Sep 16 01:11:49 2020 +0000
Revision:
0:bb348c97df44
Added PWM

Who changed what in which revision?

UserRevisionLine numberNew contents of line
lypinator 0:bb348c97df44 1 /* mbed Microcontroller Library
lypinator 0:bb348c97df44 2 * Copyright (c) 2006-2018 ARM Limited
lypinator 0:bb348c97df44 3 *
lypinator 0:bb348c97df44 4 * Licensed under the Apache License, Version 2.0 (the "License");
lypinator 0:bb348c97df44 5 * you may not use this file except in compliance with the License.
lypinator 0:bb348c97df44 6 * You may obtain a copy of the License at
lypinator 0:bb348c97df44 7 *
lypinator 0:bb348c97df44 8 * http://www.apache.org/licenses/LICENSE-2.0
lypinator 0:bb348c97df44 9 *
lypinator 0:bb348c97df44 10 * Unless required by applicable law or agreed to in writing, software
lypinator 0:bb348c97df44 11 * distributed under the License is distributed on an "AS IS" BASIS,
lypinator 0:bb348c97df44 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
lypinator 0:bb348c97df44 13 * See the License for the specific language governing permissions and
lypinator 0:bb348c97df44 14 * limitations under the License.
lypinator 0:bb348c97df44 15 */
lypinator 0:bb348c97df44 16 #ifndef __US_TICKER_DATA_H
lypinator 0:bb348c97df44 17 #define __US_TICKER_DATA_H
lypinator 0:bb348c97df44 18
lypinator 0:bb348c97df44 19 #ifdef __cplusplus
lypinator 0:bb348c97df44 20 extern "C" {
lypinator 0:bb348c97df44 21 #endif
lypinator 0:bb348c97df44 22
lypinator 0:bb348c97df44 23 #include "stm32f4xx.h"
lypinator 0:bb348c97df44 24 #include "stm32f4xx_ll_tim.h"
lypinator 0:bb348c97df44 25 #include "cmsis_nvic.h"
lypinator 0:bb348c97df44 26
lypinator 0:bb348c97df44 27 #define TIM_MST TIM5
lypinator 0:bb348c97df44 28 #define TIM_MST_IRQ TIM5_IRQn
lypinator 0:bb348c97df44 29 #define TIM_MST_RCC __HAL_RCC_TIM5_CLK_ENABLE()
lypinator 0:bb348c97df44 30 #define TIM_MST_DBGMCU_FREEZE __HAL_DBGMCU_FREEZE_TIM5()
lypinator 0:bb348c97df44 31
lypinator 0:bb348c97df44 32 #define TIM_MST_RESET_ON __HAL_RCC_TIM5_FORCE_RESET()
lypinator 0:bb348c97df44 33 #define TIM_MST_RESET_OFF __HAL_RCC_TIM5_RELEASE_RESET()
lypinator 0:bb348c97df44 34
lypinator 0:bb348c97df44 35 #define TIM_MST_BIT_WIDTH 32 // 16 or 32
lypinator 0:bb348c97df44 36
lypinator 0:bb348c97df44 37 #define TIM_MST_PCLK 1 // Select the peripheral clock number (1 or 2)
lypinator 0:bb348c97df44 38
lypinator 0:bb348c97df44 39
lypinator 0:bb348c97df44 40 #ifdef __cplusplus
lypinator 0:bb348c97df44 41 }
lypinator 0:bb348c97df44 42 #endif
lypinator 0:bb348c97df44 43
lypinator 0:bb348c97df44 44 #endif // __US_TICKER_DATA_H
lypinator 0:bb348c97df44 45