dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pios_tim_priv.h
Go to the documentation of this file.
1 #ifndef PIOS_TIM_PRIV_H
2 #define PIOS_TIM_PRIV_H
3 
4 #include <pios_stm32.h>
5 
7  TIM_TypeDef * timer;
8  const TIM_TimeBaseInitTypeDef * time_base_init;
9  struct stm32_irq irq;
10  struct stm32_irq irq2;
11 };
12 
14  TIM_TypeDef * timer;
15  uint8_t timer_chan;
16 
17  struct stm32_gpio pin;
18  uint32_t remap;
19 };
20 
22  void (*overflow)(uintptr_t tim_id, uintptr_t context, uint8_t chan_idx, uint16_t count);
23  void (*edge)(uintptr_t tim_id, uintptr_t context, uint8_t chan_idx, uint16_t count);
24 };
25 
26 int32_t PIOS_TIM_InitClock(const struct pios_tim_clock_cfg * cfg);
27 int32_t PIOS_TIM_InitChannels(uintptr_t * tim_id, const struct pios_tim_channel * channels, uint8_t num_channels, const struct pios_tim_callbacks * callbacks, uintptr_t context);
28 
29 void PIOS_TIM_InitTimerPin(uintptr_t tim_id, int idx);
30 void PIOS_TIM_InitAllTimerPins(uintptr_t tim_id);
31 void PIOS_TIM_SetBankToGPOut(uintptr_t tim_id, TIM_TypeDef *timer);
32 
33 #endif /* PIOS_TIM_PRIV_H */
Types that are specific to the STM32 peripherals.
const TIM_TimeBaseInitTypeDef * time_base_init
Definition: pios_tim_priv.h:8
const uint8_t count
Definition: panel.c:515
void PIOS_TIM_InitTimerPin(uintptr_t tim_id, int idx)
Definition: pios_tim.c:111
void(* overflow)(uintptr_t tim_id, uintptr_t context, uint8_t chan_idx, uint16_t count)
Definition: pios_tim_priv.h:22
struct stm32_irq irq2
Definition: pios_tim_priv.h:10
void PIOS_TIM_InitAllTimerPins(uintptr_t tim_id)
Definition: pios_tim.c:141
struct stm32_gpio pin
Definition: pios_tim_priv.h:17
static struct flyingpicmd_cfg_fa cfg
Definition: main.c:49
TIM_TypeDef * timer
Definition: pios_tim_priv.h:7
int32_t PIOS_TIM_InitClock(const struct pios_tim_clock_cfg *cfg)
Definition: pios_tim.c:62
int32_t PIOS_TIM_InitChannels(uintptr_t *tim_id, const struct pios_tim_channel *channels, uint8_t num_channels, const struct pios_tim_callbacks *callbacks, uintptr_t context)
Definition: pios_tim.c:172
void PIOS_TIM_SetBankToGPOut(uintptr_t tim_id, TIM_TypeDef *timer)
Definition: pios_tim.c:151
TIM_TypeDef * timer
Definition: pios_tim_priv.h:14
void(* edge)(uintptr_t tim_id, uintptr_t context, uint8_t chan_idx, uint16_t count)
Definition: pios_tim_priv.h:23
struct stm32_irq irq
Definition: pios_tim_priv.h:9