Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
cpu_timer.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
20
#include <stdint.h>
21
22
#include "cpu.h"
23
24
#ifdef __cplusplus
25
extern
"C"
{
26
#endif
27
31
#define TIMER_CHANNEL_NUMOF (4U)
32
36
#define PERIPH_TIMER_PROVIDES_SET
37
41
#define TIM_CHAN(tim, chan) *(&dev(tim)->CCR1 + chan)
42
46
typedef
struct
{
47
TIM_TypeDef *
dev
;
48
uint32_t max;
49
uint32_t
rcc_mask
;
50
uint8_t bus;
51
uint8_t irqn;
52
uint8_t channel_numof;
54
}
timer_conf_t
;
55
56
#ifdef __cplusplus
57
}
58
#endif
59
timer_conf_t
Timer device configuration.
Definition:
periph_cpu.h:260
timer_conf_t::rcc_mask
uint32_t rcc_mask
corresponding bit in the RCC register
Definition:
cpu_timer.h:49
timer_conf_t::dev
TIM_TypeDef * dev
timer device
Definition:
cpu_timer.h:47
Generated on Thu Oct 2 2025 12:06:48 by
1.9.1