Loading...
Searching...
No Matches
cpu_pwm.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016 Freie Universität Berlin
3 * SPDX-FileCopyrightText: 2017 OTA keys S.A.
4 * SPDX-License-Identifier: LGPL-2.1-only
5 */
6
7#pragma once
8
19
20#include <stdint.h>
21
22#include "cpu.h"
23#include "periph/cpu_gpio.h"
24#include "periph/cpu_timer.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
43typedef struct {
44 gpio_t pin;
45 uint8_t cc_chan;
48
52typedef struct {
53 TIM_TypeDef *dev;
54 uint32_t rcc_mask;
55#ifdef CPU_FAM_STM32F1
56 uint32_t remap;
58#endif
59 pwm_chan_t chan[TIMER_CHANNEL_NUMOF];
63 uint8_t bus;
65
66#ifdef __cplusplus
67}
68#endif
69
GPIO CPU definitions for the STM32 family.
Timer CPU specific definitions for the STM32 family.
gpio_af_t
Override alternative GPIO mode options.
Definition periph_cpu.h:162
PWM channel.
Definition periph_cpu.h:465
PWM device configuration.
uint32_t remap
AFIO remap mask to route periph to other pins (or zero, if not needed)
Definition periph_cpu.h:476
uint32_t rcc_mask
bit in clock enable register
Definition cpu_pwm.h:54
gpio_af_t af
alternate function used
Definition periph_cpu.h:481
mini_timer_t * dev
Timer used.
uint8_t bus
APB bus.
Definition periph_cpu.h:482
pwm_chan_t chan[TIMER_CHANNEL_NUMOF]
channel mapping set to {GPIO_UNDEF, 0} if not used
Definition periph_cpu.h:479