![]() |
MT7697 API Reference
LinkIt SDK v4
|
Macros | |
| #define | HAL_GPT_MAXIMUM_MS_TIMER_TIME (130150523) |
| The maximum time of millisecond timer. | |
Enumerations | |
| enum | hal_gpt_timer_type_t { HAL_GPT_TIMER_TYPE_ONE_SHOT = 0, HAL_GPT_TIMER_TYPE_REPEAT = 1 } |
| This enum defines the GPT timer type. More... | |
| enum | hal_gpt_status_t { HAL_GPT_STATUS_ERROR_PORT_USED = -4, HAL_GPT_STATUS_ERROR = -3, HAL_GPT_STATUS_ERROR_PORT = -2, HAL_GPT_STATUS_INVALID_PARAMETER = -1, HAL_GPT_STATUS_OK = 0 } |
| This enum defines the GPT status. More... | |
| enum | hal_gpt_running_status_t { HAL_GPT_STOPPED = 0, HAL_GPT_RUNNING = 1 } |
| This enum defines the GPT running status. More... | |
| enum | hal_gpt_port_t { HAL_GPT_0 = 0, HAL_GPT_1 = 1, HAL_GPT_2 = 2, HAL_GPT_4 = 4, HAL_GPT_MAX } |
| GPT port. More... | |
| enum | hal_gpt_clock_source_t { HAL_GPT_CLOCK_SOURCE_32K = 0, HAL_GPT_CLOCK_SOURCE_1M = 1, HAL_GPT_CLOCK_SOURCE_BUS = 2 } |
| GPT clock source. More... | |
GPT clock source.
| Enumerator | |
|---|---|
| HAL_GPT_CLOCK_SOURCE_32K |
1 tick = 1/32768 second |
| HAL_GPT_CLOCK_SOURCE_1M |
1 tick = 1 micro second, when using this clock source, please do not use hal_gpt_get_free_run_count() to caculate duaration count. Instead, calculate the duration count by yourself, and notice that the rollback_value = 0xffffffff/(systemclock / 1000000) |
| HAL_GPT_CLOCK_SOURCE_BUS |
1 tick = 1/systemclock second. User could use the api top_mcu_freq_get() defined in top.h to get the system clock time_us = count / (systemclock / 1000000) |
| enum hal_gpt_port_t |
GPT port.
| enum hal_gpt_status_t |
This enum defines the GPT status.
| enum hal_gpt_timer_type_t |