Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
input_capture_arch.c File Reference
+ Include dependency graph for input_capture_arch.c:

Go to the source code of this file.

Macros

#define STM32_INPUT_CAPTURE_USE_TIM1   false
 
#define STM32_INPUT_CAPTURE_USE_TIM2   false
 
#define STM32_INPUT_CAPTURE_USE_TIM3   false
 
#define STM32_INPUT_CAPTURE_USE_TIM4   false
 
#define STM32_INPUT_CAPTURE_USE_TIM5   false
 
#define STM32_INPUT_CAPTURE_USE_TIM8   false
 
#define STM32_INPUT_CAPTURE_SHARE_TIM1   false
 
#define STM32_INPUT_CAPTURE_SHARE_TIM2   false
 
#define STM32_INPUT_CAPTURE_SHARE_TIM3   false
 
#define STM32_INPUT_CAPTURE_SHARE_TIM4   false
 
#define STM32_INPUT_CAPTURE_SHARE_TIM5   false
 
#define STM32_INPUT_CAPTURE_SHARE_TIM8   false
 
#define STM32_INPUT_CAPTURE_ENABLE_TIM1_ISR   false
 
#define STM32_INPUT_CAPTURE_ENABLE_TIM2_ISR   false
 
#define STM32_INPUT_CAPTURE_ENABLE_TIM3_ISR   false
 
#define STM32_INPUT_CAPTURE_ENABLE_TIM4_ISR   false
 
#define STM32_INPUT_CAPTURE_ENABLE_TIM5_ISR   false
 
#define STM32_INPUT_CAPTURE_ENABLE_TIM8_ISR   false
 

Enumerations

enum  TimICChannel { TIMIC_CH1 =1<<0 , TIMIC_CH2 =1<<1 , TIMIC_CH3 =1<<2 , TIMIC_CH4 =1<<3 }
 

Functions

static void input_capture_lld_serve_interrupt (const TimICDriver *const timicp)
 
static void _input_capture_isr_invoke_capture_cb (const TimICDriver *const timicp, uint32_t channel)
 
static void _input_capture_isr_invoke_overflow_cb (const TimICDriver *const timicp)
 
void timIcObjectInit (TimICDriver *timicp)
 Initializes an input capture driver. More...
 
void timIcStart (TimICDriver *timicp, const TimICConfig *configp)
 start an input capture driver More...
 
void timIcStartCapture (TimICDriver *timicp)
 start to capture More...
 
void timIcStopCapture (TimICDriver *timicp)
 stop to capture More...
 
void timIcStop (TimICDriver *timicp)
 stop a quadrature encoder driver More...
 
void timIcRccEnable (const TimICDriver *const timicp)
 
void timIcRccDisable (const TimICDriver *const timicp)
 

Variables

static const TimICDriverdriverByTimerIndex [6] = {NULL}
 

Macro Definition Documentation

◆ STM32_INPUT_CAPTURE_ENABLE_TIM1_ISR

#define STM32_INPUT_CAPTURE_ENABLE_TIM1_ISR   false

Definition at line 547 of file input_capture_arch.c.

◆ STM32_INPUT_CAPTURE_ENABLE_TIM2_ISR

#define STM32_INPUT_CAPTURE_ENABLE_TIM2_ISR   false

Definition at line 551 of file input_capture_arch.c.

◆ STM32_INPUT_CAPTURE_ENABLE_TIM3_ISR

#define STM32_INPUT_CAPTURE_ENABLE_TIM3_ISR   false

Definition at line 556 of file input_capture_arch.c.

◆ STM32_INPUT_CAPTURE_ENABLE_TIM4_ISR

#define STM32_INPUT_CAPTURE_ENABLE_TIM4_ISR   false

Definition at line 561 of file input_capture_arch.c.

◆ STM32_INPUT_CAPTURE_ENABLE_TIM5_ISR

#define STM32_INPUT_CAPTURE_ENABLE_TIM5_ISR   false

Definition at line 566 of file input_capture_arch.c.

◆ STM32_INPUT_CAPTURE_ENABLE_TIM8_ISR

#define STM32_INPUT_CAPTURE_ENABLE_TIM8_ISR   false

Definition at line 571 of file input_capture_arch.c.

◆ STM32_INPUT_CAPTURE_SHARE_TIM1

#define STM32_INPUT_CAPTURE_SHARE_TIM1   false

Definition at line 523 of file input_capture_arch.c.

◆ STM32_INPUT_CAPTURE_SHARE_TIM2

#define STM32_INPUT_CAPTURE_SHARE_TIM2   false

Definition at line 527 of file input_capture_arch.c.

◆ STM32_INPUT_CAPTURE_SHARE_TIM3

#define STM32_INPUT_CAPTURE_SHARE_TIM3   false

Definition at line 531 of file input_capture_arch.c.

◆ STM32_INPUT_CAPTURE_SHARE_TIM4

#define STM32_INPUT_CAPTURE_SHARE_TIM4   false

Definition at line 535 of file input_capture_arch.c.

◆ STM32_INPUT_CAPTURE_SHARE_TIM5

#define STM32_INPUT_CAPTURE_SHARE_TIM5   false

Definition at line 539 of file input_capture_arch.c.

◆ STM32_INPUT_CAPTURE_SHARE_TIM8

#define STM32_INPUT_CAPTURE_SHARE_TIM8   false

Definition at line 543 of file input_capture_arch.c.

◆ STM32_INPUT_CAPTURE_USE_TIM1

#define STM32_INPUT_CAPTURE_USE_TIM1   false

Definition at line 499 of file input_capture_arch.c.

◆ STM32_INPUT_CAPTURE_USE_TIM2

#define STM32_INPUT_CAPTURE_USE_TIM2   false

Definition at line 503 of file input_capture_arch.c.

◆ STM32_INPUT_CAPTURE_USE_TIM3

#define STM32_INPUT_CAPTURE_USE_TIM3   false

Definition at line 507 of file input_capture_arch.c.

◆ STM32_INPUT_CAPTURE_USE_TIM4

#define STM32_INPUT_CAPTURE_USE_TIM4   false

Definition at line 511 of file input_capture_arch.c.

◆ STM32_INPUT_CAPTURE_USE_TIM5

#define STM32_INPUT_CAPTURE_USE_TIM5   false

Definition at line 515 of file input_capture_arch.c.

◆ STM32_INPUT_CAPTURE_USE_TIM8

#define STM32_INPUT_CAPTURE_USE_TIM8   false

Definition at line 519 of file input_capture_arch.c.

Enumeration Type Documentation

◆ TimICChannel

Enumerator
TIMIC_CH1 
TIMIC_CH2 
TIMIC_CH3 
TIMIC_CH4 

Definition at line 4 of file input_capture_arch.c.

Function Documentation

◆ _input_capture_isr_invoke_capture_cb()

static void _input_capture_isr_invoke_capture_cb ( const TimICDriver *const  timicp,
uint32_t  channel 
)
static

Definition at line 806 of file input_capture_arch.c.

References TimICConfig::capture_cb, TimICDriver::config, and TimICConfig::timer.

Referenced by input_capture_lld_serve_interrupt().

+ Here is the caller graph for this function:

◆ _input_capture_isr_invoke_overflow_cb()

static void _input_capture_isr_invoke_overflow_cb ( const TimICDriver *const  timicp)
static

Definition at line 813 of file input_capture_arch.c.

References TimICDriver::config, and TimICConfig::overflow_cb.

Referenced by input_capture_lld_serve_interrupt().

+ Here is the caller graph for this function:

◆ input_capture_lld_serve_interrupt()

static void input_capture_lld_serve_interrupt ( const TimICDriver *const  timicp)
static

◆ timIcObjectInit()

void timIcObjectInit ( TimICDriver timicp)

Initializes an input capture driver.

Parameters
[out]inputCaptureppointer to a TimICDriver structure @init

Definition at line 13 of file input_capture_arch.c.

References TimICDriver::config, TimICDriver::dier, TimICDriver::state, and TIMIC_STOP.

Referenced by initCache(), and timIcStop().

+ Here is the caller graph for this function:

◆ timIcRccDisable()

void timIcRccDisable ( const TimICDriver *const  timicp)

Definition at line 384 of file input_capture_arch.c.

References TimICDriver::config, and TimICConfig::timer.

Referenced by stopCapture(), and timIcStop().

+ Here is the caller graph for this function:

◆ timIcRccEnable()

◆ timIcStart()

void timIcStart ( TimICDriver timicp,
const TimICConfig configp 
)

◆ timIcStartCapture()

void timIcStartCapture ( TimICDriver timicp)

start to capture

Parameters
[in]timicppointer to a TimICDriver structure

start the input capture data from timer

Definition at line 200 of file input_capture_arch.c.

References TimICDriver::config, TimICDriver::dier, TimICDriver::state, TimICConfig::timer, TIMIC_ACTIVE, and TIMIC_READY.

Referenced by startCapture().

+ Here is the caller graph for this function:

◆ timIcStop()

void timIcStop ( TimICDriver timicp)

stop a quadrature encoder driver

Parameters
[in]timicppointer to a TimICDriver structure

stop and release the timer. After stop, any operation on timicp will result in undefined behavior and probably hardware fault

Definition at line 225 of file input_capture_arch.c.

References TimICDriver::dier, TimICDriver::mut, TimICDriver::state, TIMIC_STOP, timIcObjectInit(), and timIcRccDisable().

+ Here is the call graph for this function:

◆ timIcStopCapture()

void timIcStopCapture ( TimICDriver timicp)

stop to capture

Parameters
[in]timicppointer to a TimICDriver structure

stop the input capture data from timer

Definition at line 214 of file input_capture_arch.c.

References TimICDriver::config, TimICDriver::state, TimICConfig::timer, TIMIC_READY, and TIMIC_STOP.

Referenced by stopCapture().

+ Here is the caller graph for this function:

Variable Documentation

◆ driverByTimerIndex

const TimICDriver* driverByTimerIndex[6] = {NULL}
static

Definition at line 6 of file input_capture_arch.c.

Referenced by timIcRccEnable().