Contains all macro definitions and function prototypes support for timer4n firmware library on A31L12x. More...
Go to the source code of this file.
Data Structures | |
struct | TIMER4n_PERIODICCFG_Type |
struct | TIMER4n_CAPTURECFG_Type |
Typedefs | |
typedef struct TIMER4n_PERIODICCFG_Type | TIMER4n_ONESHOTCFG_Type |
Enumerations | |
enum | TIMER4n_CKSEL_MODE_OPT { TIMER4n_PCLK = 0, TIMER4n_ECn = 1 } |
enum | TIMER4n_MODE_OPT { TIMER4n_PERIODIC_MODE = 0, TIMER4n_CAPTURE_MODE, TIMER4n_BACKTOBACK_MODE, TIMER4n_ONESHOT_MODE } |
enum | TIMER4n_CLR_MODE_OPT { TIMER4n_FALLING_EGDE = 0, TIMER4n_RISING_EGDE, TIMER4n_BOTH_EGDE, TIMER4n_NONE } |
enum | TIMER4n_OUTB_STARTLVL_OPT { TIMER4n_OUTB_START_LOW = 0, TIMER4n_OUTB_START_HIGH } |
enum | TIMER4n_OUTA_STARTLVL_OPT { TIMER4n_OUTA_START_LOW = 0, TIMER4n_OUTA_START_HIGH } |
enum | TIMER4n_OUTB_ENABLE_OPT { TIMER4n_OUTB_DSIABLE = 0, TIMER4n_OUTB_ENABLE } |
enum | TIMER4n_OUTA_ENABLE_OPT { TIMER4n_OUTA_DSIABLE = 0, TIMER4n_OUTA_ENABLE } |
enum | TIMER4n_INT_Type { TIMER4n_INTCFG_PMIE = 0, TIMER4n_INTCFG_CIE } |
Functions | |
HAL_Status_Type | HAL_TIMER4n_Init (TIMER4n_Type *TIMER4x, TIMER4n_MODE_OPT TimerCounterMode, void *TIMER4n_Config) |
Initialize the TIMER4n peripheral with the specified parameters. More... | |
HAL_Status_Type | HAL_TIMER4n_DeInit (TIMER4n_Type *TIMER4x) |
Close Timer/Counter device. More... | |
HAL_Status_Type | HAL_TIMER4n_ConfigInterrupt (TIMER4n_Type *TIMER4x, TIMER4n_INT_Type TIMER4n_IntCfg, FunctionalState NewState) |
Configure the peripheral interrupt. More... | |
HAL_Status_Type | HAL_TIMER4n_Cmd (TIMER4n_Type *TIMER4x, FunctionalState NewState) |
Start/Stop Timer/Counter device. More... | |
HAL_Status_Type | HAL_TIMER4n_SetRegister (TIMER4n_Type *TIMER4x, uint32_t u32T4nSet, uint32_t u32T4nClk) |
Set TIMER4n CR/PREDR Registers. More... | |
Contains all macro definitions and function prototypes support for timer4n firmware library on A31L12x.
Copyright(C) 2019, ABOV Semiconductor All rights reserved.
ABOV Disclaimer
IMPORTANT NOTICE ? PLEASE READ CAREFULLY ABOV Semiconductor ("ABOV") reserves the right to make changes, corrections, enhancements, modifications, and improvements to ABOV products and/or to this document at any time without notice. ABOV does not give warranties as to the accuracy or completeness of the information included herein. Purchasers should obtain the latest relevant information of ABOV products before placing orders. Purchasers are entirely responsible for the choice, selection, and use of ABOV products and ABOV assumes no liability for application assistance or the design of purchasers' products. No license, express or implied, to any intellectual property rights is granted by ABOV herein. ABOV disclaims all express and implied warranties and shall not be responsible or liable for any injuries or damages related to use of ABOV products in such unauthorized applications. ABOV and the ABOV logo are trademarks of ABOV. All other product or service names are the property of their respective owners. Information in this document supersedes and replaces the information previously supplied in any former versions of this document. 2020 ABOV Semiconductor All rights reserved
Definition in file A31L12x_hal_timer4n.h.
typedef struct TIMER4n_PERIODICCFG_Type TIMER4n_ONESHOTCFG_Type |
counter clock source select
Enumerator | |
---|---|
TIMER4n_PCLK | clock source from pclk |
TIMER4n_ECn | clock source from ECn pin input. before setting, have to set ECn pin mode |
Definition at line 201 of file A31L12x_hal_timer4n.h.
enum TIMER4n_CLR_MODE_OPT |
Enumerator | |
---|---|
TIMER4n_FALLING_EGDE | falling edge clear mode |
TIMER4n_RISING_EGDE | rising edge clear mode |
TIMER4n_BOTH_EGDE | both edge clear mode |
TIMER4n_NONE | none clear mode |
Definition at line 215 of file A31L12x_hal_timer4n.h.
enum TIMER4n_INT_Type |
TIMER Interrupt Type definitions
Enumerator | |
---|---|
TIMER4n_INTCFG_PMIE | Period Match Interrupt enable |
TIMER4n_INTCFG_CIE | Capture Interrupt enable |
Definition at line 249 of file A31L12x_hal_timer4n.h.
enum TIMER4n_MODE_OPT |
Enumerator | |
---|---|
TIMER4n_PERIODIC_MODE | PERIODIC mode |
TIMER4n_CAPTURE_MODE | CAPTURE mode |
TIMER4n_BACKTOBACK_MODE | BACK TO BACK mode |
TIMER4n_ONESHOT_MODE | ONE SHOT mode |
Definition at line 207 of file A31L12x_hal_timer4n.h.
Enumerator | |
---|---|
TIMER4n_OUTA_DSIABLE | |
TIMER4n_OUTA_ENABLE |
Definition at line 242 of file A31L12x_hal_timer4n.h.
Enumerator | |
---|---|
TIMER4n_OUTA_START_LOW | |
TIMER4n_OUTA_START_HIGH |
Definition at line 230 of file A31L12x_hal_timer4n.h.
Enumerator | |
---|---|
TIMER4n_OUTB_DSIABLE | |
TIMER4n_OUTB_ENABLE |
Definition at line 236 of file A31L12x_hal_timer4n.h.
start default level select: initial output value.
Enumerator | |
---|---|
TIMER4n_OUTB_START_LOW | |
TIMER4n_OUTB_START_HIGH |
Definition at line 224 of file A31L12x_hal_timer4n.h.
HAL_Status_Type HAL_TIMER4n_Cmd | ( | TIMER4n_Type * | TIMER4x, |
FunctionalState | NewState | ||
) |
Start/Stop Timer/Counter device.
[in] | TIMER4x | Pointer to the target TIMER4
|
[in] | NewState | Next State of Functional Operation
|
Definition at line 264 of file A31L12x_hal_timer4n.c.
HAL_Status_Type HAL_TIMER4n_ConfigInterrupt | ( | TIMER4n_Type * | TIMER4x, |
TIMER4n_INT_Type | TIMER4n_IntCfg, | ||
FunctionalState | NewState | ||
) |
Configure the peripheral interrupt.
[in] | TIMER4x | Pointer to the target TIMER4
|
[in] | TIMER4n_IntCfg | Specifies the interrupt flag
|
[in] | NewState | Next State of Interrupt Operation
|
Definition at line 222 of file A31L12x_hal_timer4n.c.
References ENABLE, HAL_ERROR, HAL_OK, TIMER4n_INTCFG_CIE, and TIMER4n_INTCFG_PMIE.
HAL_Status_Type HAL_TIMER4n_DeInit | ( | TIMER4n_Type * | TIMER4x | ) |
Close Timer/Counter device.
[in] | TIMER4x | Pointer to the target TIMER4
|
Definition at line 162 of file A31L12x_hal_timer4n.c.
References HAL_ERROR, HAL_OK, HAL_SCU_Peripheral_EnableClock1(), and HAL_SCU_Peripheral_SetReset1().
HAL_Status_Type HAL_TIMER4n_Init | ( | TIMER4n_Type * | TIMER4x, |
TIMER4n_MODE_OPT | TimerCounterMode, | ||
void * | TIMER4n_Config | ||
) |
Initialize the TIMER4n peripheral with the specified parameters.
[in] | TIMER4x | Pointer to the target TIMER4 |
[in] | TimerCounterMode | Timer Counter Mode |
[in] | TIMER4n_Config | Pointer to the configuration information for the specified peripheral. |
Definition at line 65 of file A31L12x_hal_timer4n.c.
References TIMER4n_PERIODICCFG_Type::ADR, TIMER4n_PERIODICCFG_Type::BDR, TIMER4n_PERIODICCFG_Type::CkSel, TIMER4n_CAPTURECFG_Type::CkSel, TIMER4n_CAPTURECFG_Type::ClrMode, TIMER4n_PERIODICCFG_Type::ECE, TIMER4n_CAPTURECFG_Type::ECE, HAL_ERROR, HAL_OK, HAL_SCU_Peripheral_EnableClock1(), TIMER4n_PERIODICCFG_Type::OutAEnable, TIMER4n_PERIODICCFG_Type::OutAStartLevel, TIMER4n_PERIODICCFG_Type::OutBEnable, TIMER4n_PERIODICCFG_Type::OutBStartLevel, TIMER4n_PERIODICCFG_Type::PDR, TIMER4n_CAPTURECFG_Type::PDR, TIMER4n_PERIODICCFG_Type::Prescaler, TIMER4n_CAPTURECFG_Type::Prescaler, TIMER4n_BACKTOBACK_MODE, TIMER4n_CAPTURE_MODE, TIMER4n_ONESHOT_MODE, and TIMER4n_PERIODIC_MODE.
HAL_Status_Type HAL_TIMER4n_SetRegister | ( | TIMER4n_Type * | TIMER4x, |
uint32_t | u32T4nSet, | ||
uint32_t | u32T4nClk | ||
) |
Set TIMER4n CR/PREDR Registers.
[in] | TIMER4x | Pointer to the target TIMER4
|
[in] | u32T4nSet | TIMER4n Control Register Setting Data |
[in] | u32T4nClk | TIMER4n Prescaler Data |
This function sets the mode, external clock edge, Output pair, Delay Time Insertion and Capture Polarity.
Definition at line 297 of file A31L12x_hal_timer4n.c.