38 #include "hal_platform.h" 40 #ifdef HAL_GPT_MODULE_ENABLED 76 #ifdef HAL_GPT_FEATURE_US_TIMER 108 #ifdef HAL_GPT_SW_GPT_FEATURE 175 #ifdef HAL_GPT_FEATURE_US_TIMER 287 #ifdef HAL_GPT_FEATURE_US_TIMER 302 #ifdef HAL_GPT_SW_GPT_FEATURE 484 #ifdef HAL_GPT_FEATURE_US_TIMER 526 #ifdef HAL_GPT_SW_GPT_FEATURE hal_gpt_clock_source_t
GPT clock source.
Definition: hal_platform.h:857
GPT function error occurred.
Definition: hal_gpt.h:389
hal_gpt_status_t hal_gpt_delay_us(uint32_t us)
This function sets delay time in microseconds.
hal_gpt_status_t hal_gpt_sw_free_timer(uint32_t handle)
This function frees timer.
hal_gpt_status_t hal_gpt_get_duration_count(uint32_t start_count, uint32_t end_count, uint32_t *duration_count)
This function calculates the count duration.
hal_gpt_status_t hal_gpt_sw_stop_timer_ms(uint32_t handle)
This function stops the specified software timer.
hal_gpt_status_t hal_gpt_get_free_run_count(hal_gpt_clock_source_t clock_source, uint32_t *count)
This function gets the current count of timer in the free run mode.
hal_gpt_status_t hal_gpt_deinit(hal_gpt_port_t gpt_port)
This function de-initializes the GPT timer.
hal_gpt_status_t hal_gpt_get_running_status(hal_gpt_port_t gpt_port, hal_gpt_running_status_t *running_status)
This function gets the running status of the port as specified.
hal_gpt_status_t hal_gpt_delay_ms(uint32_t ms)
This function sets the delay time in milliseconds.
No error occurred during the function call.
Definition: hal_gpt.h:392
hal_gpt_status_t hal_gpt_init(hal_gpt_port_t gpt_port)
This function initializes the GPT base enironment.
The GPT is running.
Definition: hal_gpt.h:399
void(* hal_gpt_callback_t)(void *user_data)
Register a callback function when using GPT oneshot or repeat modes.
Definition: hal_gpt.h:371
Set the GPT oneshot mode.
Definition: hal_gpt.h:381
The GPT has stopped.
Definition: hal_gpt.h:398
An invalid parameter.
Definition: hal_gpt.h:391
Set the GPT repeat mode.
Definition: hal_gpt.h:382
hal_gpt_status_t hal_gpt_start_timer_us(hal_gpt_port_t gpt_port, uint32_t timeout_time_us, hal_gpt_timer_type_t timer_type)
This function sets the expiration time in microseconds and the timer mode, then starts the timer...
hal_gpt_running_status_t
This enum defines the GPT running status.
Definition: hal_gpt.h:397
hal_gpt_status_t hal_gpt_sw_get_remaining_time_ms(uint32_t handle, uint32_t *remaing_time)
This function gets the remaining timeout value of the specified software timer.
hal_gpt_status_t hal_gpt_register_callback(hal_gpt_port_t gpt_port, hal_gpt_callback_t callback, void *user_data)
This function registers a callback function with the timer specified at the port. ...
hal_gpt_timer_type_t
This enum defines the GPT timer type.
Definition: hal_gpt.h:380
hal_gpt_status_t hal_gpt_start_timer_ms(hal_gpt_port_t gpt_port, uint32_t timeout_time_ms, hal_gpt_timer_type_t timer_type)
This function sets the expiration time in milliseconds and the timer mode, then starts the timer...
hal_gpt_status_t hal_gpt_sw_start_timer_ms(uint32_t handle, uint32_t timeout_time_ms, hal_gpt_callback_t callback, void *user_data)
This function starts the software timer.
hal_gpt_status_t
This enum defines the GPT status.
Definition: hal_gpt.h:387
hal_gpt_port_t
GPT port.
Definition: hal_platform.h:846
hal_gpt_status_t hal_gpt_sw_get_timer(uint32_t *handle)
This function allocates timer handle.
hal_gpt_status_t hal_gpt_stop_timer(hal_gpt_port_t gpt_port)
This function stops the timer only for oneshot mode and repeat mode.
A wrong GPT port is set.
Definition: hal_gpt.h:390
The timer has beed used.
Definition: hal_gpt.h:388