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

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

`#include "gr55xx_hal_def.h"`
`#include "gr55xx_ll_dual_tim.h"`

Go to the source code of this file.

## Data Structures
struct | _dual_timer_init
| DUAL TIMER init Structure definition. More...
struct | _dual_timer_handle
| DUAL_TIMER handle Structure definition. More...
struct | _hal_dual_timer_callback
| HAL_DUAL_TIMER Callback function definition. More...

## Macros
#define | DUAL_TIMER_PRESCALER_DIV0 LL_DUAL_TIMER_PRESCALER_DIV0
#define | DUAL_TIMER_PRESCALER_DIV16 LL_DUAL_TIMER_PRESCALER_DIV16
#define | DUAL_TIMER_PRESCALER_DIV256 LL_DUAL_TIMER_PRESCALER_DIV256
#define | DUAL_TIMER_COUNTERMODE_LOOP 0x00000000U
#define | DUAL_TIMER_COUNTERMODE_ONESHOT DUAL_TIMER_CTRL_ONESHOT
#define | __HAL_DUAL_TIMER_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->state = HAL_DUAL_TIMER_STATE_RESET)
| Reset DUAL TIMER handle states. More...
#define | __HAL_DUAL_TIMER_ENABLE(__HANDLE__) SET_BITS((__HANDLE__)->p_instance->CTRL, DUAL_TIMER_CTRL_EN)
| Enable the specified DUAL TIMER peripheral. More...
#define | __HAL_DUAL_TIMER_DISABLE(__HANDLE__) CLEAR_BITS((__HANDLE__)->p_instance->CTRL, DUAL_TIMER_CTRL_EN)
| Disable the specified DUAL TIMER peripheral. More...
#define | __HAL_DUAL_TIMER_ENABLE_IT(__HANDLE__) SET_BITS((__HANDLE__)->p_instance->CTRL, DUAL_TIMER_CTRL_INTEN)
| Enable the DUAL TIMER interrupt. More...
#define | __HAL_DUAL_TIMER_DISABLE_IT(__HANDLE__) CLEAR_BITS((__HANDLE__)->p_instance->CTRL, DUAL_TIMER_CTRL_INTEN)
| Disable the DUAL TIMER interrupt. More...
#define | __HAL_DUAL_TIMER_GET_FLAG_IT(__HANDLE__) ll_dual_timer_is_active_flag_it(__HANDLE__->p_instance)
| Check whether the DUAL TIMER interrupt has occurred or not. More...
#define | __HAL_DUAL_TIMER_CLEAR_FLAG_IT(__HANDLE__) ll_dual_timer_clear_flag_it(__HANDLE__->p_instance)
| Clear the DUAL TIMER interrupt flag. More...
#define | IS_DUAL_TIMER_PRESCALER(__PRESCALER__)
| Check if DUAL TIMER prescaler is valid. More...
#define | IS_DUAL_TIMER_COUNTERMODE(__MODE__)
| Check if DUAL TIMER counter mode is valid. More...

## Typedefs
typedef struct _dual_timer_init | dual_timer_init_t
| DUAL TIMER init Structure definition.
typedef struct _dual_timer_handle | dual_timer_handle_t
| DUAL_TIMER handle Structure definition.
typedef struct _hal_dual_timer_callback | hal_dual_timer_callback_t
| HAL_DUAL_TIMER Callback function definition.

## Enumerations
enum | hal_dual_timer_state_t { HAL_DUAL_TIMER_STATE_RESET = 0x00, HAL_DUAL_TIMER_STATE_READY = 0x01, HAL_DUAL_TIMER_STATE_BUSY = 0x02, HAL_DUAL_TIMER_STATE_ERROR = 0x04 }
| HAL DUAL TIMER State Enumerations definition. More...

## Functions
hal_status_t | hal_dual_timer_base_init (dual_timer_handle_t *p_dual_timer)
| Initialize the DUAL TIMER according to the specified parameters in the dual_timer_init_t and initialize the associated handle. More...
hal_status_t | hal_dual_timer_base_deinit (dual_timer_handle_t *p_dual_timer)
| De-initialize the DUAL TIMER peripheral. More...
void | hal_dual_timer_base_msp_init (dual_timer_handle_t *p_dual_timer)
| Initialize the DUAL TIMER MSP. More...
void | hal_dual_timer_base_msp_deinit (dual_timer_handle_t *p_dual_timer)
| De-initialize the DUAL TIMER MSP. More...
hal_status_t | hal_dual_timer_base_start (dual_timer_handle_t *p_dual_timer)
| Starts the DUAL TIMER counter. More...
hal_status_t | hal_dual_timer_base_stop (dual_timer_handle_t *p_dual_timer)
| Stops the DUAL TIMER counter. More...
hal_status_t | hal_dual_timer_base_start_it (dual_timer_handle_t *p_dual_timer)
| Starts the DUAL TIMER counter in interrupt mode. More...
hal_status_t | hal_dual_timer_base_stop_it (dual_timer_handle_t *p_dual_timer)
| Stops the DUAL TIMER counter in interrupt mode. More...
void | hal_dual_timer_irq_handler (dual_timer_handle_t *p_dual_timer)
| Handle DUAL TIMER interrupt request. More...
void | hal_dual_timer_period_elapsed_callback (dual_timer_handle_t *p_dual_timer)
| Period elapsed callback in non-blocking mode. More...
hal_dual_timer_state_t | hal_dual_timer_get_state (dual_timer_handle_t *p_dual_timer)
| Return the DUAL TIMER handle state. More...
hal_status_t | hal_dual_timer_set_config (dual_timer_handle_t *p_dual_timer, dual_timer_init_t *p_structure)
| DUAL TIMER configuration. More...
hal_status_t | hal_dual_timer_set_background_reload (dual_timer_handle_t *p_dual_timer, uint32_t reload_value)
| DUAL TIMER set background reload value The background reload value contains the value from which the counter is to decrement. This is the value used to reload the counter when Periodic mode is enabled, and the current count reaches 0. The difference is that writes to background reload value do not cause the counter to immediately restart from the new value. More...

## Detailed Description

Header file containing functions prototypes of DUAL 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.