Loading...
Searching...
No Matches
cpu_pwm.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016 Freie Universität Berlin
3 * 2017 OTA keys S.A.
4 *
5 * This file is subject to the terms and conditions of the GNU Lesser
6 * General Public License v2.1. See the file LICENSE in the top level
7 * directory for more details.
8 */
9
21#ifndef PERIPH_CPU_PWM_H
22#define PERIPH_CPU_PWM_H
23
24#include <stdint.h>
25
26#include "cpu.h"
27#include "periph/cpu_gpio.h"
28#include "periph/cpu_timer.h"
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
47typedef struct {
48 gpio_t pin;
49 uint8_t cc_chan;
52
56typedef struct {
57 TIM_TypeDef *dev;
58 uint32_t rcc_mask;
59#ifdef CPU_FAM_STM32F1
60 uint32_t remap;
62#endif
63 pwm_chan_t chan[TIMER_CHANNEL_NUMOF];
66 gpio_af_t af;
67 uint8_t bus;
69
70#ifdef __cplusplus
71}
72#endif
73
74#endif /* PERIPH_CPU_PWM_H */
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:166
PWM channel.
Definition periph_cpu.h:469
PWM device configuration.
uint32_t rcc_mask
bit in clock enable register
Definition cpu_pwm.h:58
TIM_TypeDef * dev
Timer used.
Definition cpu_pwm.h:57