TMPM4KxA Group Peripheral Driver User Manual
V1.0.4.0
|
Functions | |
TXZ_Result | t32a_mode_init (t32a_t *p_obj) |
Mode Initialize the T32A object. More... | |
TXZ_Result | t32a_timer_init (t32a_t *p_obj, uint32_t type) |
Initialize the T32A object. More... | |
TXZ_Result | t32a_deinit (t32a_t *p_obj, uint32_t type) |
Release the T32A object. More... | |
TXZ_Result | t32a_timer_stopIT (t32a_t *p_obj, uint32_t type) |
Timer Stop in interrupt mode. More... | |
TXZ_Result | t32a_timer_startIT (t32a_t *p_obj, uint32_t type) |
Timer Start in interrupt mode. More... | |
TXZ_Result | t32a_SWcounter_start (t32a_t *p_obj, uint32_t type) |
Timer Start in interrupt mode. More... | |
TXZ_Result | t32a_SWcounter_stop (t32a_t *p_obj, uint32_t type) |
Timer Stop in interrupt mode. More... | |
TXZ_Result | t32a_reg_set (t32a_t *p_obj, uint32_t type, uint32_t num, uint32_t value) |
Timer Register Value Setting. More... | |
TXZ_Result | t32a_tmr_read (t32a_t *p_obj, uint32_t type, uint32_t *p_val) |
Timer Register Value Read. More... | |
TXZ_Result | t32a_get_status (t32a_t *p_obj, uint32_t *p_status, uint32_t type) |
Get status. More... | |
void | t32a_timer_IRQHandler (t32a_t *p_obj) |
IRQ Handler for Timer interrupt. More... | |
void | t32a_timer_cap0_IRQHandler (t32a_t *p_obj) |
IRQ Timer Capture0 Handler for Timer Capture0 interrupt. More... | |
void | t32a_timer_cap1_IRQHandler (t32a_t *p_obj) |
IRQ Timer Capture1 Handler for Timer Capture1 interrupt. More... | |
TXZ_Result | t32a_Calculator (uint32_t *p_value, uint32_t time, uint32_t prescaler, uint32_t prscl) |
Calculate timer value to set timer register. More... | |
TXZ_Result t32a_Calculator | ( | uint32_t * | p_value, |
uint32_t | time, | ||
uint32_t | prescaler, | ||
uint32_t | prscl | ||
) |
Calculate timer value to set timer register.
p_value | time value store pointer. |
time | The require period which the uint is us. |
prescaler | System Clock Freq |
prscl | Select the division for source clock T32A PRESCALER Control. |
the | value set to Tmrb timer register. |
TXZ_Result t32a_deinit | ( | t32a_t * | p_obj, |
uint32_t | type | ||
) |
Release the T32A object.
p_obj | :T32A object. |
type | :T32A Timer Type. : Use t32_type_t |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
TXZ_Result t32a_get_status | ( | t32a_t * | p_obj, |
uint32_t * | p_status, | ||
uint32_t | type | ||
) |
Get status.
Status bits.
Bit | Bit Symbol | Function |
---|---|---|
31-4 | - | - |
3 | INTUFA | Under Flow Intterrupt. Use T32A_INTOFx_FLG_MASK. |
2 | INTOFA | Over Flow Intterrupt. Use T32A_INTOFx_FLG_MASK. |
1 | INTx1 | Match up TimerRegister x1 Intterrupt. Use T32A_INTx1_FLG_MASK. |
0 | INTx0 | Match up TimerRegister x0 Intterrupt. Use T32A_INTx0_FLG_MASK. |
p_obj | :T32A object. |
p_status | :Save area for status. |
type | :T32A Timer Type. : Use t32_type_t |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
TXZ_Result t32a_mode_init | ( | t32a_t * | p_obj | ) |
Mode Initialize the T32A object.
p_obj | :T32A object. |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
TXZ_Result t32a_reg_set | ( | t32a_t * | p_obj, |
uint32_t | type, | ||
uint32_t | num, | ||
uint32_t | value | ||
) |
Timer Register Value Setting.
p_obj | :T32A object. |
type | :T32A Timer Type. : Use t32_type_t |
num | :T32A Register Number. : Use t32_regnum_t |
value | :Setting Value. |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
TXZ_Result t32a_SWcounter_start | ( | t32a_t * | p_obj, |
uint32_t | type | ||
) |
Timer Start in interrupt mode.
p_obj | :T32A object. |
type | :T32A Timer Type. : Use t32_type_t |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
TXZ_Result t32a_SWcounter_stop | ( | t32a_t * | p_obj, |
uint32_t | type | ||
) |
Timer Stop in interrupt mode.
p_obj | :T32A object. |
type | :T32A Timer Type. : Use t32_type_t |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
void t32a_timer_cap0_IRQHandler | ( | t32a_t * | p_obj | ) |
IRQ Timer Capture0 Handler for Timer Capture0 interrupt.
p_obj | :T32A object. |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
void t32a_timer_cap1_IRQHandler | ( | t32a_t * | p_obj | ) |
IRQ Timer Capture1 Handler for Timer Capture1 interrupt.
p_obj | :T32A object. |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
TXZ_Result t32a_timer_init | ( | t32a_t * | p_obj, |
uint32_t | type | ||
) |
Initialize the T32A object.
p_obj | :T32A object. |
type | :T32A Timer Type. : Use t32_type_t |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
void t32a_timer_IRQHandler | ( | t32a_t * | p_obj | ) |
IRQ Handler for Timer interrupt.
p_obj | :T32A object. |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
TXZ_Result t32a_timer_startIT | ( | t32a_t * | p_obj, |
uint32_t | type | ||
) |
Timer Start in interrupt mode.
p_obj | :T32A object. |
type | :T32A Timer Type. : Use t32_type_t |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
TXZ_Result t32a_timer_stopIT | ( | t32a_t * | p_obj, |
uint32_t | type | ||
) |
Timer Stop in interrupt mode.
p_obj | :T32A object. |
type | :T32A Timer Type. : Use t32_type_t |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |
TXZ_Result t32a_tmr_read | ( | t32a_t * | p_obj, |
uint32_t | type, | ||
uint32_t * | p_val | ||
) |
Timer Register Value Read.
p_obj | :T32A object. |
type | :T32A Timer Type. : Use t32_type_t |
p_val | :Save area for register value. |
TXZ_SUCCESS | :Success. |
TXZ_ERROR | :Failure. |