ll_tim.h File Reference

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

#include "gr5x.h"

Go to the source code of this file.

Classes

struct  _ll_timer_capture_channel_init
 LL TIMER capture channel Structure definition. More...
 
struct  _ll_timer_init_t
 LL TIMER init Structure definition. More...
 

Macros

#define TIMER_DEFAULT_CONFIG
 LL TIMER InitStrcut default configuartion. More...
 
#define LL_TIMER_INTSTAT_COUNTDONE   TIMER_COUNTDONE_INT_STAT
 LL TIMER Interrupt source identify. More...
 
#define LL_TIMER_INTSTAT_CH0   TIMER_CH0_INT_STAT
 
#define LL_TIMER_INTSTAT_CH1   TIMER_CH1_INT_STAT
 
#define LL_TIMER_INTSTAT_CH2   TIMER_CH2_INT_STAT
 
#define LL_TIMER_INTSTAT_CH3   TIMER_CH3_INT_STAT
 
#define LL_TIMER_INTSTAT_BLEPULSE1   TIMER_BLEPULSE1_INT_STAT
 
#define LL_TIMER_INTSTAT_BLEPULSE2   TIMER_BLEPULSE2_INT_STAT
 
#define LL_TIMER_WriteReg(__instance__, __REG__, __VALUE__)   WRITE_REG(__instance__->__REG__, (__VALUE__))
 Write a value in TIMER register. More...
 
#define LL_TIMER_ReadReg(__instance__, __REG__)   READ_REG(__instance__->__REG__)
 Read a value in TIMER register. More...
 

Typedefs

typedef struct _ll_timer_capture_channel_init ll_timer_capture_channel_init_t
 LL TIMER capture channel Structure definition. More...
 
typedef struct _ll_timer_init_t ll_timer_init_t
 LL TIMER init Structure definition. More...
 

Enumerations

enum  ll_timer_capture_type_t {
  LL_TIMER_CAPTURE_NONE = 0x00,
  LL_TIMER_CAPTURE_FALLING = 0x01,
  LL_TIMER_CAPTURE_RISING = 0x02,
  LL_TIMER_CAPTURE_BOTH = 0x03
}
 LL TIMER capture type Enumerations definition. More...
 
enum  ll_timer_capture_pin_t {
  LL_TIMER_CAPTURE_IO0 = 0x00,
  LL_TIMER_CAPTURE_IO1 = 0x01,
  LL_TIMER_CAPTURE_IO2 = 0x02,
  LL_TIMER_CAPTURE_IO3 = 0x03,
  LL_TIMER_CAPTURE_IO4 = 0x04,
  LL_TIMER_CAPTURE_IO5 = 0x05,
  LL_TIMER_CAPTURE_IO6 = 0x06,
  LL_TIMER_CAPTURE_IO7 = 0x07,
  LL_TIMER_CAPTURE_IO8 = 0x08,
  LL_TIMER_CAPTURE_IO9 = 0x09,
  LL_TIMER_CAPTURE_IO10 = 0x0A,
  LL_TIMER_CAPTURE_IO11 = 0x0B,
  LL_TIMER_CAPTURE_IO12 = 0x0C,
  LL_TIMER_CAPTURE_IO13 = 0x0D,
  LL_TIMER_CAPTURE_IO14 = 0x0E,
  LL_TIMER_CAPTURE_IO15 = 0x0F,
  LL_TIMER_CAPTURE_IO16 = 0x10,
  LL_TIMER_CAPTURE_IO17 = 0x11,
  LL_TIMER_CAPTURE_IO18 = 0x12,
  LL_TIMER_CAPTURE_IO19 = 0x13,
  LL_TIMER_CAPTURE_IO20 = 0x14,
  LL_TIMER_CAPTURE_IO21 = 0x15,
  LL_TIMER_CAPTURE_IO22 = 0x16,
  LL_TIMER_CAPTURE_IO23 = 0x17,
  LL_TIMER_CAPTURE_IO24 = 0x18,
  LL_TIMER_CAPTURE_IO25 = 0x19,
  LL_TIMER_CAPTURE_IO26 = 0x1A,
  LL_TIMER_CAPTURE_IO27 = 0x1B,
  LL_TIMER_CAPTURE_IO28 = 0x1C,
  LL_TIMER_CAPTURE_IO29 = 0x1D,
  LL_TIMER_CAPTURE_IO30 = 0x1E,
  LL_TIMER_CAPTURE_IO31 = 0x1F
}
 LL TIMER capture pin Enumerations definition. More...
 

Functions

__STATIC_INLINE void ll_timer_enable_counter (timer_regs_t *TIMERx)
 Enable timer counter. More...
 
__STATIC_INLINE void ll_timer_disable_counter (timer_regs_t *TIMERx)
 Disable timer counter. More...
 
__STATIC_INLINE uint32_t ll_timer_is_enabled_counter (timer_regs_t *TIMERx)
 Indicate whether the timer counter is enabled. More...
 
__STATIC_INLINE void ll_timer_set_counter (timer_regs_t *TIMERx, uint32_t counter)
 Set the counter value. More...
 
__STATIC_INLINE uint32_t ll_timer_get_counter (timer_regs_t *TIMERx)
 Get the counter value. More...
 
__STATIC_INLINE void ll_timer_set_auto_reload (timer_regs_t *TIMERx, uint32_t auto_reload)
 Set the auto-reload value. More...
 
__STATIC_INLINE uint32_t ll_timer_get_auto_reload (timer_regs_t *TIMERx)
 Get the auto-reload value. More...
 
__STATIC_INLINE void ll_timer_enable_all_it (timer_regs_t *TIMERx)
 Enable timer all interrupt. More...
 
__STATIC_INLINE void ll_timer_disable_all_it (timer_regs_t *TIMERx)
 Disable timer all interrput. More...
 
__STATIC_INLINE void ll_timer_enable_countdone_it (timer_regs_t *TIMERx)
 Enable timer countdone interrupt. More...
 
__STATIC_INLINE void ll_timer_disable_countdone_it (timer_regs_t *TIMERx)
 Disable timer countdone interrput. More...
 
__STATIC_INLINE void ll_timer_enable_channel0_it (timer_regs_t *TIMERx)
 Enable timer channel0 interrupt. More...
 
__STATIC_INLINE void ll_timer_disable_channel0_it (timer_regs_t *TIMERx)
 Disable timer channel0 interrput. More...
 
__STATIC_INLINE void ll_timer_enable_channel1_it (timer_regs_t *TIMERx)
 Enable timer channel1 interrupt. More...
 
__STATIC_INLINE void ll_timer_disable_channel1_it (timer_regs_t *TIMERx)
 Disable timer channel1 interrput. More...
 
__STATIC_INLINE void ll_timer_enable_channel2_it (timer_regs_t *TIMERx)
 Enable timer channel2 interrupt. More...
 
__STATIC_INLINE void ll_timer_disable_channel2_it (timer_regs_t *TIMERx)
 Disable timer channel2 interrput. More...
 
__STATIC_INLINE void ll_timer_enable_channel3_it (timer_regs_t *TIMERx)
 Enable timer channel3 interrupt. More...
 
__STATIC_INLINE void ll_timer_disable_channel3_it (timer_regs_t *TIMERx)
 Disable timer channel3 interrput. More...
 
__STATIC_INLINE void ll_timer_enable_blepulse1_it (timer_regs_t *TIMERx)
 Enable timer ble pulse 1 interrupt. More...
 
__STATIC_INLINE void ll_timer_disable_blepulse1_it (timer_regs_t *TIMERx)
 Disable timer ble pulse 1 interrput. More...
 
__STATIC_INLINE void ll_timer_enable_blepulse2_it (timer_regs_t *TIMERx)
 Enable timer ble pulse 2 interrupt. More...
 
__STATIC_INLINE void ll_timer_disable_blepulse2_it (timer_regs_t *TIMERx)
 Disable timer ble pulse 2 interrput. More...
 
__STATIC_INLINE uint32_t ll_timer_is_enabled_it (timer_regs_t *TIMERx)
 Indicate whether the timer interrput is enabled. More...
 
__STATIC_INLINE void ll_timer_clear_countdone_flag_it (timer_regs_t *TIMERx)
 Clear the COUNTDONE interrupt flag. More...
 
__STATIC_INLINE void ll_timer_clear_channel0_flag_it (timer_regs_t *TIMERx)
 Clear the CHANNEL0 interrupt flag. More...
 
__STATIC_INLINE void ll_timer_clear_channel1_flag_it (timer_regs_t *TIMERx)
 Clear the CHANNEL1 interrupt flag. More...
 
__STATIC_INLINE void ll_timer_clear_channel2_flag_it (timer_regs_t *TIMERx)
 Clear the CHANNEL2 interrupt flag. More...
 
__STATIC_INLINE void ll_timer_clear_channel3_flag_it (timer_regs_t *TIMERx)
 Clear the CHANNEL3 interrupt flag. More...
 
__STATIC_INLINE void ll_timer_clear_blepulse1_flag_it (timer_regs_t *TIMERx)
 Clear the ble pulse 1 interrupt flag. More...
 
__STATIC_INLINE void ll_timer_clear_blepulse2_flag_it (timer_regs_t *TIMERx)
 Clear the ble pulse 2 interrupt flag. More...
 
__STATIC_INLINE void ll_timer_clear_all_flag_it (timer_regs_t *TIMERx)
 Clear the all interrupt flag. More...
 
__STATIC_INLINE uint32_t ll_timer_is_active_flag_it (timer_regs_t *TIMERx)
 Indicate whether interrupt flag (INTSTAT) is set (interrupt is pending). More...
 
void ll_timer_struct_init (ll_timer_init_t *p_timer_init)
 Set each field of a ll_timer_init_t type structure to default value. More...
 
__STATIC_INLINE void ll_timer_set_channel0_capture_type (timer_regs_t *TIMERx, uint8_t ll_edge_capture)
 Set timer channel0 capture type. More...
 
__STATIC_INLINE ll_timer_capture_type_t ll_timer_get_channel0_capture_type (timer_regs_t *TIMERx)
 Get timer channel0 capture type. More...
 
__STATIC_INLINE void ll_timer_set_channel1_capture_type (timer_regs_t *TIMERx, uint8_t ll_edge_capture)
 Set timer channel1 capture type. More...
 
__STATIC_INLINE ll_timer_capture_type_t ll_timer_get_channel1_capture_type (timer_regs_t *TIMERx)
 Get timer channel1 capture type. More...
 
__STATIC_INLINE void ll_timer_set_channel2_capture_type (timer_regs_t *TIMERx, uint8_t ll_edge_capture)
 Set timer channel2 capture type. More...
 
__STATIC_INLINE ll_timer_capture_type_t ll_timer_get_channel2_capture_type (timer_regs_t *TIMERx)
 Get timer channel2 capture type. More...
 
__STATIC_INLINE void ll_timer_set_channel3_capture_type (timer_regs_t *TIMERx, uint8_t ll_edge_capture)
 Set timer channel3 capture type. More...
 
__STATIC_INLINE ll_timer_capture_type_t ll_timer_get_channel3_capture_type (timer_regs_t *TIMERx)
 Get timer channel3 capture type. More...
 
__STATIC_INLINE void ll_timer_set_channel0_capture_pin (timer_regs_t *TIMERx, uint8_t ll_capture_pin)
 Set timer channel0 capture pin. More...
 
__STATIC_INLINE ll_timer_capture_pin_t ll_timer_get_channel0_capture_pin (timer_regs_t *TIMERx)
 Get timer channel0 capture pin. More...
 
__STATIC_INLINE void ll_timer_set_channel1_capture_pin (timer_regs_t *TIMERx, uint8_t ll_capture_pin)
 Set timer channel1 capture pin. More...
 
__STATIC_INLINE ll_timer_capture_pin_t ll_timer_get_channel1_capture_pin (timer_regs_t *TIMERx)
 Get timer channel1 capture pin. More...
 
__STATIC_INLINE void ll_timer_set_channel2_capture_pin (timer_regs_t *TIMERx, uint8_t ll_capture_pin)
 Set timer channel2 capture pin. More...
 
__STATIC_INLINE ll_timer_capture_pin_t ll_timer_get_channel2_capture_pin (timer_regs_t *TIMERx)
 Get timer channel2 capture pin. More...
 
__STATIC_INLINE void ll_timer_set_channel3_capture_pin (timer_regs_t *TIMERx, uint8_t ll_capture_pin)
 Set timer channel3 capture pin. More...
 
__STATIC_INLINE ll_timer_capture_pin_t ll_timer_get_channel3_capture_pin (timer_regs_t *TIMERx)
 Get timer channel3 capture pin. More...
 
__STATIC_INLINE uint32_t ll_timer_get_it_flag (timer_regs_t *TIMERx)
 Get timer interrupt flag. More...
 
__STATIC_INLINE uint32_t ll_timer_get_channel0_val (timer_regs_t *TIMERx)
 Get current value of channel0. More...
 
__STATIC_INLINE uint32_t ll_timer_get_channel1_val (timer_regs_t *TIMERx)
 Get current value of channel1. More...
 
__STATIC_INLINE uint32_t ll_timer_get_channel2_val (timer_regs_t *TIMERx)
 Get current value of channel2. More...
 
__STATIC_INLINE uint32_t ll_timer_get_channel3_val (timer_regs_t *TIMERx)
 Get current value of channel3. More...
 
__STATIC_INLINE void ll_timer_enable_ble_pulse (timer_regs_t *TIMERx)
 Enable timer BLE pulse. More...
 
__STATIC_INLINE void ll_timer_disable_ble_pulse (timer_regs_t *TIMERx)
 Disable timer BLE pulse. More...
 
__STATIC_INLINE uint32_t ll_timer_is_enabled_ble_pulse (timer_regs_t *TIMERx)
 Indicate whether the timer BLE pulse is enabled. More...
 
__STATIC_INLINE void ll_timer_set_BLE_val1 (timer_regs_t *TIMERx, uint32_t value)
 Set the BLE count value1. More...
 
__STATIC_INLINE uint32_t ll_timer_get_BLE_val1 (timer_regs_t *TIMERx)
 Get the BLE count value1. More...
 
__STATIC_INLINE void ll_timer_set_BLE_val2 (timer_regs_t *TIMERx, uint32_t value)
 Set the BLE count value2. More...
 
__STATIC_INLINE uint32_t ll_timer_get_BLE_val2 (timer_regs_t *TIMERx)
 Get the BLE count value2. More...
 
__STATIC_INLINE void ll_timer_set_BLE_pulse_width (timer_regs_t *TIMERx, uint32_t width)
 Set the BLE pulse width. More...
 
__STATIC_INLINE uint32_t ll_timer_get_pulse_width (timer_regs_t *TIMERx)
 Get the BLE pulse width. More...
 

Detailed Description

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

Definition in file ll_tim.h.