55 lines
1.5 KiB
C
55 lines
1.5 KiB
C
/****************************************************************************
|
|
|
|
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
|
|
|
|
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
|
|
be copied by any method or incorporated into another program without
|
|
the express written consent of Aerospace C.Power. This Information or any portion
|
|
thereof remains the property of Aerospace C.Power. The Information contained herein
|
|
is believed to be accurate and Aerospace C.Power assumes no responsibility or
|
|
liability for its use in any way and conveys no license or title under
|
|
any patent or copyright and makes no representation or warranty that this
|
|
Information is free from patent or copyright infringement.
|
|
|
|
****************************************************************************/
|
|
|
|
#ifndef _GP_TIMER_H
|
|
#define _GP_TIMER_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef enum
|
|
{
|
|
GP_TIMER = 0,
|
|
GP_COUNT,
|
|
}GP_MODE;
|
|
|
|
void gp_timer_init();
|
|
|
|
void gp_timer_set(uint8_t id, uint32_t val, uint8_t repeat);
|
|
|
|
void gp_timer_start(uint8_t id);
|
|
|
|
void gp_timer_stop(uint8_t id);
|
|
|
|
void gp_timer_enable(uint8_t id, uint8_t mode, uint8_t us);
|
|
|
|
uint32_t gp_timer_get_current_val(uint8_t id);
|
|
|
|
uint32_t gp_timer_get_int_status(uint8_t id);
|
|
|
|
void gp_timer_clear_int_status(uint8_t id);
|
|
|
|
void gp_timer_set_gpio_latch(uint8_t timer_id, uint8_t pad_id);
|
|
|
|
uint32_t gp_timer_get_vector(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif //_GP_TIMER_H
|
|
|