Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
cpu_timer.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_TIMER_H
22
#define PERIPH_CPU_TIMER_H
23
24
#include <stdint.h>
25
26
#include "cpu.h"
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
35
#define TIMER_CHANNEL_NUMOF (4U)
36
40
#define PERIPH_TIMER_PROVIDES_SET
41
45
#define TIM_CHAN(tim, chan) *(&dev(tim)->CCR1 + chan)
46
50
typedef
struct
{
51
TIM_TypeDef *
dev
;
52
uint32_t max;
53
uint32_t
rcc_mask
;
54
uint8_t bus;
55
uint8_t irqn;
56
uint8_t channel_numof;
58
}
timer_conf_t
;
59
60
#ifdef __cplusplus
61
}
62
#endif
63
64
#endif
/* PERIPH_CPU_TIMER_H */
timer_conf_t
Timer device configuration.
Definition
periph_cpu.h:264
timer_conf_t::rcc_mask
uint32_t rcc_mask
corresponding bit in the RCC register
Definition
cpu_timer.h:53
timer_conf_t::dev
TIM_TypeDef * dev
timer device
Definition
cpu_timer.h:51
Generated on Fri Dec 20 2024 20:01:56 by
1.9.8