Initialization and de-initialization functions

Functions

error_status_t ll_timer_deinit (timer_regs_t *TIMERx)
 De-initialize TIMER registers (Registers restored to their default values). More...
 
error_status_t ll_timer_init (timer_regs_t *TIMERx, ll_timer_init_t *p_timer_init)
 Initialize TIMER registers according to the specified parameters in TIMER_InitStruct. 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, ll_timer_capture_type_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, ll_timer_capture_type_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, ll_timer_capture_type_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, ll_timer_capture_type_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, ll_timer_capture_pin_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, ll_timer_capture_pin_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, ll_timer_capture_pin_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, ll_timer_capture_pin_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

Function Documentation

◆ ll_timer_deinit()

error_status_t ll_timer_deinit ( timer_regs_t *  TIMERx)

De-initialize TIMER registers (Registers restored to their default values).

Parameters
TIMERxTIMER instance
Return values
Anerror_status_t enumeration value:
  • SUCCESS: TIMER registers are de-initialized
  • ERROR: TIMER registers are not de-initialized

◆ ll_timer_disable_ble_pulse()

__STATIC_INLINE void ll_timer_disable_ble_pulse ( timer_regs_t *  TIMERx)

Disable timer BLE pulse.

Register|BitsName --------|-------- CTRL | BLE_PULSE_CTRL

Parameters
TIMERxTimer instance
Return values
None

Definition at line 1139 of file gr533x_ll_tim.h.

◆ ll_timer_enable_ble_pulse()

__STATIC_INLINE void ll_timer_enable_ble_pulse ( timer_regs_t *  TIMERx)

Enable timer BLE pulse.

Register|BitsName --------|-------- CTRL | BLE_PULSE_CTRL

Parameters
TIMERxTimer instance
Return values
None

Definition at line 1124 of file gr533x_ll_tim.h.

◆ ll_timer_get_BLE_val1()

__STATIC_INLINE uint32_t ll_timer_get_BLE_val1 ( timer_regs_t *  TIMERx)

Get the BLE count value1.

Register|BitsName --------|-------- BLE_COUNTVAL1 | BLE_VAL1

Parameters
TIMERxTimer instance
Return values
BLEcount value1

Definition at line 1185 of file gr533x_ll_tim.h.

◆ ll_timer_get_BLE_val2()

__STATIC_INLINE uint32_t ll_timer_get_BLE_val2 ( timer_regs_t *  TIMERx)

Get the BLE count value2.

Register|BitsName --------|-------- BLE_COUNTVAL2 | BLE_VAL2

Parameters
TIMERxTimer instance
Return values
BLEcount value2

Definition at line 1216 of file gr533x_ll_tim.h.

◆ ll_timer_get_channel0_capture_pin()

__STATIC_INLINE ll_timer_capture_pin_t ll_timer_get_channel0_capture_pin ( timer_regs_t *  TIMERx)

Get timer channel0 capture pin.

Register|BitsName --------|-------- CTRL | TIMER_CH0_PIN_SELECT

Parameters
TIMERxTimer instance
Return values
capturepin of channel0

Definition at line 941 of file gr533x_ll_tim.h.

◆ ll_timer_get_channel0_capture_type()

__STATIC_INLINE ll_timer_capture_type_t ll_timer_get_channel0_capture_type ( timer_regs_t *  TIMERx)

Get timer channel0 capture type.

Register|BitsName --------|-------- CTRL | TIMER_CH0_EDGE_DET

Parameters
TIMERxTimer instance
Return values
capturetype of channel0

Definition at line 817 of file gr533x_ll_tim.h.

◆ ll_timer_get_channel0_val()

__STATIC_INLINE uint32_t ll_timer_get_channel0_val ( timer_regs_t *  TIMERx)

Get current value of channel0.

Register|BitsName --------|-------- CHANNEL0_VAL | CHANNEL0_VAL

Parameters
TIMERxTimer instance
Return values
Currenttimer value

Definition at line 1064 of file gr533x_ll_tim.h.

◆ ll_timer_get_channel1_capture_pin()

__STATIC_INLINE ll_timer_capture_pin_t ll_timer_get_channel1_capture_pin ( timer_regs_t *  TIMERx)

Get timer channel1 capture pin.

Register|BitsName --------|-------- CTRL | TIMER_CH1_PIN_SELECT

Parameters
TIMERxTimer instance
Return values
capturepin of channel1

Definition at line 972 of file gr533x_ll_tim.h.

◆ ll_timer_get_channel1_capture_type()

__STATIC_INLINE ll_timer_capture_type_t ll_timer_get_channel1_capture_type ( timer_regs_t *  TIMERx)

Get timer channel1 capture type.

Register|BitsName --------|-------- CTRL | TIMER_CH1_EDGE_DET

Parameters
TIMERxTimer instance
Return values
capturetype of channel1

Definition at line 848 of file gr533x_ll_tim.h.

◆ ll_timer_get_channel1_val()

__STATIC_INLINE uint32_t ll_timer_get_channel1_val ( timer_regs_t *  TIMERx)

Get current value of channel1.

Register|BitsName --------|-------- CHANNEL1_VAL | CHANNEL1_VAL

Parameters
TIMERxTimer instance
Return values
Currenttimer value

Definition at line 1079 of file gr533x_ll_tim.h.

◆ ll_timer_get_channel2_capture_pin()

__STATIC_INLINE ll_timer_capture_pin_t ll_timer_get_channel2_capture_pin ( timer_regs_t *  TIMERx)

Get timer channel2 capture pin.

Register|BitsName --------|-------- CTRL | TIMER_CH2_PIN_SELECT

Parameters
TIMERxTimer instance
Return values
capturepin of channel2

Definition at line 1003 of file gr533x_ll_tim.h.

◆ ll_timer_get_channel2_capture_type()

__STATIC_INLINE ll_timer_capture_type_t ll_timer_get_channel2_capture_type ( timer_regs_t *  TIMERx)

Get timer channel2 capture type.

Register|BitsName --------|-------- CTRL | TIMER_CH2_EDGE_DET

Parameters
TIMERxTimer instance
Return values
capturetype of channel2

Definition at line 879 of file gr533x_ll_tim.h.

◆ ll_timer_get_channel2_val()

__STATIC_INLINE uint32_t ll_timer_get_channel2_val ( timer_regs_t *  TIMERx)

Get current value of channel2.

Register|BitsName --------|-------- CHANNEL2_VAL | CHANNEL2_VAL

Parameters
TIMERxTimer instance
Return values
Currenttimer value

Definition at line 1094 of file gr533x_ll_tim.h.

◆ ll_timer_get_channel3_capture_pin()

__STATIC_INLINE ll_timer_capture_pin_t ll_timer_get_channel3_capture_pin ( timer_regs_t *  TIMERx)

Get timer channel3 capture pin.

Register|BitsName --------|-------- CTRL | TIMER_CH3_PIN_SELECT

Parameters
TIMERxTimer instance
Return values
capturepin of channel3

Definition at line 1034 of file gr533x_ll_tim.h.

◆ ll_timer_get_channel3_capture_type()

__STATIC_INLINE ll_timer_capture_type_t ll_timer_get_channel3_capture_type ( timer_regs_t *  TIMERx)

Get timer channel3 capture type.

Register|BitsName --------|-------- CTRL | TIMER_CH3_EDGE_DET

Parameters
TIMERxTimer instance
Return values
capturetype of channel3

Definition at line 910 of file gr533x_ll_tim.h.

◆ ll_timer_get_channel3_val()

__STATIC_INLINE uint32_t ll_timer_get_channel3_val ( timer_regs_t *  TIMERx)

Get current value of channel3.

Register|BitsName --------|-------- CHANNEL3_VAL | CHANNEL3_VAL

Parameters
TIMERxTimer instance
Return values
Currenttimer value

Definition at line 1109 of file gr533x_ll_tim.h.

◆ ll_timer_get_it_flag()

__STATIC_INLINE uint32_t ll_timer_get_it_flag ( timer_regs_t *  TIMERx)

Get timer interrupt flag.

Register|BitsName --------|-------- INTSTAT | COUNTDONE_INTSTAT/CHx_INTSTAT

Parameters
TIMERxTimer instance
Return values
interruptflag

Definition at line 1049 of file gr533x_ll_tim.h.

◆ ll_timer_get_pulse_width()

__STATIC_INLINE uint32_t ll_timer_get_pulse_width ( timer_regs_t *  TIMERx)

Get the BLE pulse width.

Register|BitsName --------|-------- BLE_PULSEWIDTH | BLE_PLS

Parameters
TIMERxTimer instance
Return values
BLEpulse width

Definition at line 1247 of file gr533x_ll_tim.h.

◆ ll_timer_init()

error_status_t ll_timer_init ( timer_regs_t *  TIMERx,
ll_timer_init_t p_timer_init 
)

Initialize TIMER registers according to the specified parameters in TIMER_InitStruct.

Parameters
TIMERxTIMER instance
p_timer_initPointer to a ll_timer_init_t structure that contains the configuration information for the specified TIM peripheral.
Return values
Anerror_status_t enumeration value:
  • SUCCESS: TIMER registers are initialized according to p_timer_init content
  • ERROR: Problem occurred during TIMER Registers initialization

◆ ll_timer_is_enabled_ble_pulse()

__STATIC_INLINE uint32_t ll_timer_is_enabled_ble_pulse ( timer_regs_t *  TIMERx)

Indicate whether the timer BLE pulse is enabled.

Register|BitsName --------|-------- CTRL | BLE_PULSE_CTRL

Parameters
TIMERxTimer instance
Return values
Stateof bit (1 or 0).

Definition at line 1154 of file gr533x_ll_tim.h.

◆ ll_timer_set_BLE_pulse_width()

__STATIC_INLINE void ll_timer_set_BLE_pulse_width ( timer_regs_t *  TIMERx,
uint32_t  width 
)

Set the BLE pulse width.

Register|BitsName --------|-------- BLE_PULSEWIDTH | BLE_PLS

Parameters
TIMERxTimer instance
widthpulse width
Return values
None

Definition at line 1232 of file gr533x_ll_tim.h.

◆ ll_timer_set_BLE_val1()

__STATIC_INLINE void ll_timer_set_BLE_val1 ( timer_regs_t *  TIMERx,
uint32_t  value 
)

Set the BLE count value1.

Register|BitsName --------|-------- BLE_COUNTVAL1 | BLE_VAL1

Parameters
TIMERxTimer instance
valuecount value between Min_Data=0 and Max_Data=0xFFFFFFFF
Return values
None

Definition at line 1170 of file gr533x_ll_tim.h.

◆ ll_timer_set_BLE_val2()

__STATIC_INLINE void ll_timer_set_BLE_val2 ( timer_regs_t *  TIMERx,
uint32_t  value 
)

Set the BLE count value2.

Register|BitsName --------|-------- BLE_COUNTVAL2 | BLE_VAL2

Parameters
TIMERxTimer instance
valuecount value between Min_Data=0 and Max_Data=0xFFFFFFFF
Return values
None

Definition at line 1201 of file gr533x_ll_tim.h.

◆ ll_timer_set_channel0_capture_pin()

__STATIC_INLINE void ll_timer_set_channel0_capture_pin ( timer_regs_t *  TIMERx,
ll_timer_capture_pin_t  ll_capture_pin 
)

Set timer channel0 capture pin.

Register|BitsName --------|-------- CTRL | TIMER_CH0_PIN_SELECT

Parameters
TIMERxTimer instance
ll_capture_pincapture pin select
Return values
None

Definition at line 926 of file gr533x_ll_tim.h.

◆ ll_timer_set_channel0_capture_type()

__STATIC_INLINE void ll_timer_set_channel0_capture_type ( timer_regs_t *  TIMERx,
ll_timer_capture_type_t  ll_edge_capture 
)

Set timer channel0 capture type.

Register|BitsName --------|-------- CTRL | TIMER_CH0_EDGE_DET

Parameters
TIMERxTimer instance
ll_edge_captureedge capture type
Return values
None

Definition at line 802 of file gr533x_ll_tim.h.

◆ ll_timer_set_channel1_capture_pin()

__STATIC_INLINE void ll_timer_set_channel1_capture_pin ( timer_regs_t *  TIMERx,
ll_timer_capture_pin_t  ll_capture_pin 
)

Set timer channel1 capture pin.

Register|BitsName --------|-------- CTRL | TIMER_CH1_PIN_SELECT

Parameters
TIMERxTimer instance
ll_capture_pincapture pin select
Return values
None

Definition at line 957 of file gr533x_ll_tim.h.

◆ ll_timer_set_channel1_capture_type()

__STATIC_INLINE void ll_timer_set_channel1_capture_type ( timer_regs_t *  TIMERx,
ll_timer_capture_type_t  ll_edge_capture 
)

Set timer channel1 capture type.

Register|BitsName --------|-------- CTRL | TIMER_CH1_EDGE_DET

Parameters
TIMERxTimer instance
ll_edge_captureedge capture type
Return values
None

Definition at line 833 of file gr533x_ll_tim.h.

◆ ll_timer_set_channel2_capture_pin()

__STATIC_INLINE void ll_timer_set_channel2_capture_pin ( timer_regs_t *  TIMERx,
ll_timer_capture_pin_t  ll_capture_pin 
)

Set timer channel2 capture pin.

Register|BitsName --------|-------- CTRL | TIMER_CH2_PIN_SELECT

Parameters
TIMERxTimer instance
ll_capture_pincapture pin select
Return values
None

Definition at line 988 of file gr533x_ll_tim.h.

◆ ll_timer_set_channel2_capture_type()

__STATIC_INLINE void ll_timer_set_channel2_capture_type ( timer_regs_t *  TIMERx,
ll_timer_capture_type_t  ll_edge_capture 
)

Set timer channel2 capture type.

Register|BitsName --------|-------- CTRL | TIMER_CH2_EDGE_DET

Parameters
TIMERxTimer instance
ll_edge_captureedge capture type
Return values
None

Definition at line 864 of file gr533x_ll_tim.h.

◆ ll_timer_set_channel3_capture_pin()

__STATIC_INLINE void ll_timer_set_channel3_capture_pin ( timer_regs_t *  TIMERx,
ll_timer_capture_pin_t  ll_capture_pin 
)

Set timer channel3 capture pin.

Register|BitsName --------|-------- CTRL | TIMER_CH3_PIN_SELECT

Parameters
TIMERxTimer instance
ll_capture_pincapture pin select
Return values
None

Definition at line 1019 of file gr533x_ll_tim.h.

◆ ll_timer_set_channel3_capture_type()

__STATIC_INLINE void ll_timer_set_channel3_capture_type ( timer_regs_t *  TIMERx,
ll_timer_capture_type_t  ll_edge_capture 
)

Set timer channel3 capture type.

Register|BitsName --------|-------- CTRL | TIMER_CH3_EDGE_DET

Parameters
TIMERxTimer instance
ll_edge_captureedge capture type
Return values
None

Definition at line 895 of file gr533x_ll_tim.h.

◆ ll_timer_struct_init()

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.

Parameters
p_timer_initPointer to a ll_timer_init_t structure whose fields will be set to default values.
Return values
None