Data Structures | Macros | Typedefs | Enumerations | Functions
gr55xx_hal_tim.h File Reference

Header file containing functions prototypes of TIMER HAL library. More...

`#include "gr55xx_hal_def.h"`
`#include "gr55xx_ll_tim.h"`

Go to the source code of this file.

## Data Structures
struct | _timer_init
| TIMER init Structure definition. More...
struct | _timer_handle
| TIMER handle Structure definition. More...
struct | _hal_timer_callback
| HAL_TIMER Callback function definition. More...

## Macros
#define | __HAL_TIMER_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->state = HAL_TIMER_STATE_RESET)
| Reset TIMER handle states. More...
#define | __HAL_TIMER_ENABLE(__HANDLE__) SET_BITS((__HANDLE__)->p_instance->CTRL, TIMER_CTRL_EN)
| Enable the specified TIMER peripheral. More...
#define | __HAL_TIMER_DISABLE(__HANDLE__) CLEAR_BITS((__HANDLE__)->p_instance->CTRL, TIMER_CTRL_EN)
| Disable the specified TIMER peripheral. More...
#define | __HAL_TIMER_ENABLE_IT(__HANDLE__) SET_BITS((__HANDLE__)->p_instance->CTRL, TIMER_CTRL_INTEN)
| Enable the TIMER interrupt. More...
#define | __HAL_TIMER_DISABLE_IT(__HANDLE__) CLEAR_BITS((__HANDLE__)->p_instance->CTRL, TIMER_CTRL_INTEN)
| Disable the TIMER interrupt. More...
#define | __HAL_TIMER_GET_FLAG_IT(__HANDLE__) ll_timer_is_active_flag_it(__HANDLE__->p_instance)
| Check whether the TIMER interrupt has occurred or not. More...
#define | __HAL_TIMER_CLEAR_FLAG_IT(__HANDLE__) ll_timer_clear_flag_it(__HANDLE__->p_instance)
| Clear the TIMER interrupt flag. More...

## Typedefs
typedef struct _timer_init | timer_init_t
| TIMER init Structure definition.
typedef struct _timer_handle | timer_handle_t
| TIMER handle Structure definition.
typedef struct _hal_timer_callback | hal_timer_callback_t
| HAL_TIMER Callback function definition.

## Enumerations
enum | hal_timer_state_t { HAL_TIMER_STATE_RESET = 0x00, HAL_TIMER_STATE_READY = 0x01, HAL_TIMER_STATE_BUSY = 0x02, HAL_TIMER_STATE_ERROR = 0x04 }
| HAL TIMER State Enumerations definition. More...

## Functions
hal_status_t | hal_timer_base_init (timer_handle_t *p_timer)
| Initialize the TIMER according to the specified parameters in the timer_init_t and initialize the associated handle. More...
hal_status_t | hal_timer_base_deinit (timer_handle_t *p_timer)
| De-initialize the TIMER peripheral. More...
void | hal_timer_base_msp_init (timer_handle_t *p_timer)
| Initialize the TIMER MSP. More...
void | hal_timer_base_msp_deinit (timer_handle_t *p_timer)
| De-initialize the TIMER MSP. More...
hal_status_t | hal_timer_base_start (timer_handle_t *p_timer)
| Starts the TIMER counter. More...
hal_status_t | hal_timer_base_stop (timer_handle_t *p_timer)
| Stops the TIMER counter. More...
hal_status_t | hal_timer_base_start_it (timer_handle_t *p_timer)
| Starts the TIMER counter in interrupt mode. More...
hal_status_t | hal_timer_base_stop_it (timer_handle_t *p_timer)
| Stops the TIMER counter in interrupt mode. More...
void | hal_timer_irq_handler (timer_handle_t *p_timer)
| Handle TIMER interrupt request. More...
void | hal_timer_period_elapsed_callback (timer_handle_t *p_timer)
| Period elapsed callback in non-blocking mode. More...
hal_timer_state_t | hal_timer_get_state (timer_handle_t *p_timer)
| Return the TIMER handle state. More...
hal_status_t | hal_timer_set_config (timer_handle_t *p_timer, timer_init_t *p_structure)
| TIMER configuration. More...

## Detailed Description

Header file containing functions prototypes of TIMER HAL library.

Author
  BLE Driver Team

Attention

  ##### Copyright (c) 2019 GOODIX

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.