80 if( TIMER1x == ( TIMER1n_Type* )TIMER10 )
87 if( TIMER1x == ( TIMER1n_Type* )TIMER11 )
94 if( TIMER1x == ( TIMER1n_Type* )TIMER12 )
101 if( TIMER1x == ( TIMER1n_Type* )TIMER13 )
108 if( TIMER1x == ( TIMER1n_Type* )TIMER14 )
115 if( TIMER1x == ( TIMER1n_Type* )TIMER15 )
121 #if 0 // not supported 122 if( TIMER1x == ( TIMER1n_Type* )TIMER16 )
133 | TIMER1n_CR_CKSEL_SET( pTimeCfg->
CkSel )
134 | TIMER1n_CR_MODE_SET( TimerCounterMode )
135 | TIMER1n_CR_STARTLVL_SET( pTimeCfg->
StartLevel )
137 if( pTimeCfg->
CkSel == 1 )
139 reg_val16 = reg_val16 | TIMER1n_CR_ECE_SET( pTimeCfg->
ECE );
141 TIMER1x->CR = reg_val16;
143 TIMER1x->PREDR = ( ( pTimeCfg->
Prescaler - 1 ) & TIMER1n_PRS_MASK );
144 TIMER1x->ADR = pTimeCfg->
ADR;
151 | TIMER1n_CR_CKSEL_SET( pPwmOneshotCfg->
CkSel )
152 | TIMER1n_CR_MODE_SET( TimerCounterMode )
153 | TIMER1n_CR_STARTLVL_SET( pPwmOneshotCfg->
StartLevel )
155 if( pPwmOneshotCfg->
CkSel == 1 )
157 reg_val16 = reg_val16 | TIMER1n_CR_ECE_SET( pPwmOneshotCfg->
ECE );
159 TIMER1x->CR = reg_val16;
161 TIMER1x->PREDR = ( ( pPwmOneshotCfg->
Prescaler - 1 ) & TIMER1n_PRS_MASK );
162 TIMER1x->ADR = pPwmOneshotCfg->
ADR;
163 TIMER1x->BDR = pPwmOneshotCfg->
BDR;
170 | TIMER1n_CR_CKSEL_SET( pCaptureCfg->
CkSel )
171 | TIMER1n_CR_MODE_SET( TimerCounterMode )
172 | TIMER1n_CR_CPOL_SET( pCaptureCfg->
ClrMode )
174 if( pCaptureCfg->
CkSel == 1 )
176 reg_val16 = reg_val16 | TIMER1n_CR_ECE_SET( pCaptureCfg->
ECE );
178 TIMER1x->CR = reg_val16;
180 TIMER1x->PREDR = ( ( pCaptureCfg->
Prescaler - 1 ) & TIMER1n_PRS_MASK );
181 TIMER1x->ADR = pCaptureCfg->
ADR;
198 if( TIMER1x == NULL )
207 if( TIMER1x == ( TIMER1n_Type* )TIMER10 )
214 if( TIMER1x == ( TIMER1n_Type* )TIMER11 )
221 if( TIMER1x == ( TIMER1n_Type* )TIMER12 )
228 if( TIMER1x == ( TIMER1n_Type* )TIMER13 )
235 if( TIMER1x == ( TIMER1n_Type* )TIMER14 )
242 if( TIMER1x == ( TIMER1n_Type* )TIMER15 )
248 #if 0 // not supported 249 if( TIMER1x == ( TIMER1n_Type* )TIMER16 )
277 if( TIMER1x == NULL )
282 switch( TIMER1n_IntCfg )
285 tmp = TIMER1n_MATINTEN;
288 tmp = TIMER1n_CAPINTEN;
298 TIMER1x->CR &= ( ~tmp );
317 if( TIMER1x == NULL )
324 TIMER1x->CR |= TIMER1n_ENABLE;
328 TIMER1x->CR &= ~TIMER1n_ENABLE;
350 if( TIMER1x == NULL )
355 TIMER1x->CR = u32T1nSet;
357 TIMER1x->PREDR = u32T1nClk;
HAL_Status_Type HAL_TIMER1n_Cmd(TIMER1n_Type *TIMER1x, FunctionalState NewState)
Start/Stop Timer/Counter device.
void HAL_SCU_Peripheral_EnableClock1(uint32_t u32PeriClk1, uint32_t Ind)
Set Each Peripheral Clock.
HAL_Status_Type HAL_TIMER1n_Init(TIMER1n_Type *TIMER1x, TIMER1n_MODE_OPT TimerCounterMode, void *TIMER1n_Config)
Initialize the TIMER1n peripheral with the specified parameters.
Contains all macro definitions and function prototypes support for scu firmware library on A31R71x.
Contains all macro definitions and function prototypes support for timer1n firmware library on A31R71...
HAL_Status_Type HAL_TIMER1n_DeInit(TIMER1n_Type *TIMER1x)
Close Timer/Counter device.
HAL_Status_Type HAL_TIMER1n_SetRegister(TIMER1n_Type *TIMER1x, uint32_t u32T1nSet, uint32_t u32T1nClk)
Set TIMER1n CR/PREDR Registers.
HAL_Status_Type HAL_TIMER1n_ConfigInterrupt(TIMER1n_Type *TIMER1x, TIMER1n_INT_Type TIMER1n_IntCfg, FunctionalState NewState)
Configure the peripheral interrupt.