Contains all macro definitions and function prototypes support for timer1n firmware library on A31G11x. More...
Go to the source code of this file.
Data Structures | |
struct | TIMER1n_PERIODICCFG_Type |
struct | TIMER1n_PWMCFG_Type |
struct | TIMER1n_CAPTURECFG_Type |
Typedefs | |
typedef struct TIMER1n_PWMCFG_Type | TIMER1n_ONESHOTCFG_Type |
Enumerations | |
enum | TIMER1n_CKSEL_MODE_OPT { TIMER1n_PCLK = 0, TIMER1n_ECn = 1 } |
enum | TIMER1n_MODE_OPT { TIMER1n_PERIODIC_MODE = 0, TIMER1n_CAPTURE_MODE, TIMER1n_ONESHOT_MODE, TIMER1n_PWM_MODE } |
enum | TIMER1n_CLR_MODE_OPT { TIMER1n_FALLING_EGDE = 0, TIMER1n_RISING_EGDE, TIMER1n_BOTH_EGDE, TIMER1n_NONE } |
enum | TIMER1n_STARTLVL_OPT { TIMER1n_START_HIGH = 0, TIMER1n_START_LOW } |
enum | TIMER1n_INT_Type { TIMER1n_INTCFG_MIE = 0, TIMER1n_INTCFG_CIE } |
Functions | |
HAL_Status_Type | HAL_TIMER1n_Init (TIMER1n_Type *TIMER1x, TIMER1n_MODE_OPT TimerCounterMode, void *TIMER1n_Config) |
Initialize the TIMER1n peripheral with the specified parameters. More... | |
HAL_Status_Type | HAL_TIMER1n_DeInit (TIMER1n_Type *TIMER1x) |
Close Timer/Counter device. More... | |
HAL_Status_Type | HAL_TIMER1n_ConfigInterrupt (TIMER1n_Type *TIMER1x, TIMER1n_INT_Type TIMER1n_IntCfg, FunctionalState NewState) |
Configure the peripheral interrupt. More... | |
HAL_Status_Type | HAL_TIMER1n_Cmd (TIMER1n_Type *TIMER1x, FunctionalState NewState) |
Start/Stop Timer/Counter device. More... | |
HAL_Status_Type | HAL_TIMER1n_SetRegister (TIMER1n_Type *TIMER1x, uint32_t u32T1nSet, uint32_t u32T1nClk) |
Set TIMER1n CR/PREDR Registers. More... | |
Contains all macro definitions and function prototypes support for timer1n firmware library on A31G11x.
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 A31G11x_hal_timer1n.h.
typedef struct TIMER1n_PWMCFG_Type TIMER1n_ONESHOTCFG_Type |
counter clock source select
Enumerator | |
---|---|
TIMER1n_PCLK | clock source from pclk |
TIMER1n_ECn | clock source from ECn pin input. before setting, have to set ECn pin mode |
Definition at line 95 of file A31G11x_hal_timer1n.h.
enum TIMER1n_CLR_MODE_OPT |
Enumerator | |
---|---|
TIMER1n_FALLING_EGDE | falling edge clear mode |
TIMER1n_RISING_EGDE | rising edge clear mode |
TIMER1n_BOTH_EGDE | both edge clear mode |
TIMER1n_NONE | none clear mode |
Definition at line 109 of file A31G11x_hal_timer1n.h.
enum TIMER1n_INT_Type |
TIMER Interrupt Type definitions
Enumerator | |
---|---|
TIMER1n_INTCFG_MIE | Match Interrupt enable |
TIMER1n_INTCFG_CIE | Capture Interrupt enable |
Definition at line 125 of file A31G11x_hal_timer1n.h.
enum TIMER1n_MODE_OPT |
Enumerator | |
---|---|
TIMER1n_PERIODIC_MODE | PERIODIC mode |
TIMER1n_CAPTURE_MODE | CAPTURE mode |
TIMER1n_ONESHOT_MODE | ONE SHOT mode |
TIMER1n_PWM_MODE | PWM mode |
Definition at line 101 of file A31G11x_hal_timer1n.h.
enum TIMER1n_STARTLVL_OPT |
start default level select: initial output value.
Enumerator | |
---|---|
TIMER1n_START_HIGH | |
TIMER1n_START_LOW |
Definition at line 118 of file A31G11x_hal_timer1n.h.
HAL_Status_Type HAL_TIMER1n_Cmd | ( | TIMER1n_Type * | TIMER1x, |
FunctionalState | NewState | ||
) |
Start/Stop Timer/Counter device.
[in] | TIMER1x | Pointer to the target TIMER1
|
[in] | NewState | Next State of Functional Operation
|
Definition at line 313 of file A31G11x_hal_timer1n.c.
HAL_Status_Type HAL_TIMER1n_ConfigInterrupt | ( | TIMER1n_Type * | TIMER1x, |
TIMER1n_INT_Type | TIMER1n_IntCfg, | ||
FunctionalState | NewState | ||
) |
Configure the peripheral interrupt.
[in] | TIMER1x | Pointer to the target TIMER1
|
[in] | TIMER1n_IntCfg | Specifies the interrupt flag
|
[in] | NewState | Next State of Interrupt Operation
|
Definition at line 271 of file A31G11x_hal_timer1n.c.
References ENABLE, HAL_ERROR, HAL_OK, TIMER1n_INTCFG_CIE, and TIMER1n_INTCFG_MIE.
HAL_Status_Type HAL_TIMER1n_DeInit | ( | TIMER1n_Type * | TIMER1x | ) |
Close Timer/Counter device.
[in] | TIMER1x | Pointer to the target TIMER1
|
Definition at line 194 of file A31G11x_hal_timer1n.c.
References HAL_ERROR, HAL_OK, and HAL_SCU_Peripheral_EnableClock1().
HAL_Status_Type HAL_TIMER1n_Init | ( | TIMER1n_Type * | TIMER1x, |
TIMER1n_MODE_OPT | TimerCounterMode, | ||
void * | TIMER1n_Config | ||
) |
Initialize the TIMER1n peripheral with the specified parameters.
[in] | TIMER1x | Pointer to the target TIMER1 |
[in] | TimerCounterMode | Timer Counter Mode |
[in] | TIMER1n_Config | Pointer to the configuration information for the specified peripheral. |
Definition at line 65 of file A31G11x_hal_timer1n.c.
References TIMER1n_PERIODICCFG_Type::ADR, TIMER1n_PWMCFG_Type::ADR, TIMER1n_CAPTURECFG_Type::ADR, TIMER1n_PWMCFG_Type::BDR, TIMER1n_PERIODICCFG_Type::CkSel, TIMER1n_PWMCFG_Type::CkSel, TIMER1n_CAPTURECFG_Type::CkSel, TIMER1n_CAPTURECFG_Type::ClrMode, TIMER1n_PERIODICCFG_Type::ECE, TIMER1n_PWMCFG_Type::ECE, TIMER1n_CAPTURECFG_Type::ECE, HAL_ERROR, HAL_OK, HAL_SCU_Peripheral_EnableClock1(), TIMER1n_PERIODICCFG_Type::Prescaler, TIMER1n_PWMCFG_Type::Prescaler, TIMER1n_CAPTURECFG_Type::Prescaler, TIMER1n_PERIODICCFG_Type::StartLevel, TIMER1n_PWMCFG_Type::StartLevel, TIMER1n_CAPTURE_MODE, TIMER1n_ONESHOT_MODE, TIMER1n_PERIODIC_MODE, and TIMER1n_PWM_MODE.
HAL_Status_Type HAL_TIMER1n_SetRegister | ( | TIMER1n_Type * | TIMER1x, |
uint32_t | u32T1nSet, | ||
uint32_t | u32T1nClk | ||
) |
Set TIMER1n CR/PREDR Registers.
[in] | TIMER1x | Pointer to the target TIMER1
|
[in] | u32T1nSet | TIMER1n Control Register Setting Data |
[in] | u32T1nClk | TIMER1n Prescaler Data |
This function sets the mode, external clock edge, Timer out polarity, Capture Polarity and Timer match/capture interrupt.
Definition at line 346 of file A31G11x_hal_timer1n.c.