STM8S/A Standard Peripherals Drivers
|
This file contains all functions prototype and macros for the TIM4 peripheral. More...
#include "stm8s.h"
Go to the source code of this file.
Defines | |
#define | IS_TIM4_EVENT_SOURCE_OK(SOURCE) (((SOURCE) == 0x01)) |
#define | IS_TIM4_GET_FLAG_OK(FLAG) ((FLAG) == TIM4_FLAG_UPDATE) |
#define | IS_TIM4_IT_OK(IT) ((IT) == TIM4_IT_UPDATE) |
#define | IS_TIM4_OPM_MODE_OK(MODE) |
#define | IS_TIM4_PRESCALER_OK(PRESCALER) |
#define | IS_TIM4_PRESCALER_RELOAD_OK(RELOAD) |
#define | IS_TIM4_UPDATE_SOURCE_OK(SOURCE) |
Enumerations | |
enum | TIM4_EventSource_TypeDef { TIM4_EVENTSOURCE_UPDATE = ((uint8_t)0x01) } |
TIM4 Event Source. More... | |
enum | TIM4_FLAG_TypeDef { TIM4_FLAG_UPDATE = ((uint8_t)0x01) } |
TIM4 Flags. More... | |
enum | TIM4_IT_TypeDef { TIM4_IT_UPDATE = ((uint8_t)0x01) } |
TIM4 interrupt sources. More... | |
enum | TIM4_OPMode_TypeDef { TIM4_OPMODE_SINGLE = ((uint8_t)0x01), TIM4_OPMODE_REPETITIVE = ((uint8_t)0x00) } |
TIM4 One Pulse Mode. More... | |
enum | TIM4_Prescaler_TypeDef { TIM4_PRESCALER_1 = ((uint8_t)0x00), TIM4_PRESCALER_2 = ((uint8_t)0x01), TIM4_PRESCALER_4 = ((uint8_t)0x02), TIM4_PRESCALER_8 = ((uint8_t)0x03), TIM4_PRESCALER_16 = ((uint8_t)0x04), TIM4_PRESCALER_32 = ((uint8_t)0x05), TIM4_PRESCALER_64 = ((uint8_t)0x06), TIM4_PRESCALER_128 = ((uint8_t)0x07) } |
TIM4 Prescaler. More... | |
enum | TIM4_PSCReloadMode_TypeDef { TIM4_PSCRELOADMODE_UPDATE = ((uint8_t)0x00), TIM4_PSCRELOADMODE_IMMEDIATE = ((uint8_t)0x01) } |
TIM4 Prescaler Reload Mode. More... | |
enum | TIM4_UpdateSource_TypeDef { TIM4_UPDATESOURCE_GLOBAL = ((uint8_t)0x00), TIM4_UPDATESOURCE_REGULAR = ((uint8_t)0x01) } |
TIM4 Update Source. More... | |
Functions | |
void | TIM4_ARRPreloadConfig (FunctionalState NewState) |
Enables or disables TIM4 peripheral Preload register on ARR. | |
void | TIM4_ClearFlag (TIM4_FLAG_TypeDef TIM4_FLAG) |
Clears the TIM4�s pending flags. | |
void | TIM4_ClearITPendingBit (TIM4_IT_TypeDef TIM4_IT) |
Clears the TIM4's interrupt pending bits. | |
void | TIM4_Cmd (FunctionalState NewState) |
Enables or disables the TIM4 peripheral. | |
void | TIM4_DeInit (void) |
Deinitializes the TIM4 peripheral registers to their default reset values. | |
void | TIM4_GenerateEvent (TIM4_EventSource_TypeDef TIM4_EventSource) |
Configures the TIM4 event to be generated by software. | |
uint8_t | TIM4_GetCounter (void) |
Gets the TIM4 Counter value. | |
FlagStatus | TIM4_GetFlagStatus (TIM4_FLAG_TypeDef TIM4_FLAG) |
Checks whether the specified TIM4 flag is set or not. | |
ITStatus | TIM4_GetITStatus (TIM4_IT_TypeDef TIM4_IT) |
Checks whether the TIM4 interrupt has occurred or not. | |
TIM4_Prescaler_TypeDef | TIM4_GetPrescaler (void) |
Gets the TIM4 Prescaler value. | |
void | TIM4_ITConfig (TIM4_IT_TypeDef TIM4_IT, FunctionalState NewState) |
Enables or disables the specified TIM4 interrupts. | |
void | TIM4_PrescalerConfig (TIM4_Prescaler_TypeDef Prescaler, TIM4_PSCReloadMode_TypeDef TIM4_PSCReloadMode) |
Configures the TIM4 Prescaler. | |
void | TIM4_SelectOnePulseMode (TIM4_OPMode_TypeDef TIM4_OPMode) |
Selects the TIM4�s One Pulse Mode. | |
void | TIM4_SetAutoreload (uint8_t Autoreload) |
Sets the TIM4 Autoreload Register value. | |
void | TIM4_SetCounter (uint8_t Counter) |
Sets the TIM4 Counter Register value. | |
void | TIM4_TimeBaseInit (TIM4_Prescaler_TypeDef TIM4_Prescaler, uint8_t TIM4_Period) |
Initializes the TIM4 Time Base Unit according to the specified parameters. | |
void | TIM4_UpdateDisableConfig (FunctionalState NewState) |
Enables or Disables the TIM4 Update event. | |
void | TIM4_UpdateRequestConfig (TIM4_UpdateSource_TypeDef TIM4_UpdateSource) |
Selects the TIM4 Update Request Interrupt source. |
Detailed Description
This file contains all functions prototype and macros for the TIM4 peripheral.
- Attention:
© COPYRIGHT 2014 STMicroelectronics
Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:
http://www.st.com/software_license_agreement_liberty_v2
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file stm8s_tim4.h.