-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathmtu_base.hpp
68 lines (59 loc) · 2.01 KB
/
mtu_base.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#pragma once
//=========================================================================//
/*! @file
@brief MTU2x/MTU3x 共通定義
@author 平松邦仁 ([email protected])
@copyright Copyright (C) 2024 Kunihito Hiramatsu @n
Released under the MIT license @n
https://github.com/hirakuni45/RX/blob/master/LICENSE
*/
//=========================================================================//
#include <cstdint>
namespace device {
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
/*!
@brief MTU ベース・クラス(各 MTU 共通)
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
struct mtu_base_t {
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
/*!
@brief TYPE 型(全体の種別なので、チャネルとは異なる)
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
enum class TYPE : uint8_t {
MTU2, ///< MTU2: RX621 / RX62N
MTU2a, ///< MTU2a: RX110 / RX111 / RX113 / RX130 / RX140 / RX220 / RX231 / RX63N / RX631
MTU3, ///< MTU3: RX63T
MTU3a, ///< MTU3a: RX64M / RX71M / RX65N / RX651 / RX66N / RX671 / RX72N / RX72M
MTU3c, ///< MTU3c: RX13T
MTU3d, ///< MTU3d: RX24T / RX26T / RX66T / RX72T
};
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
/*!
@brief クロック分周器型
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
enum class CLOCK_DIVIDER : uint8_t {
T0, ///< 1/1, 1/4, 1/16, 1/64
T1, ///< 1/1, 1/4, 1/16, 1/64, 1/256
T2, ///< 1/1, 1/4, 1/16, 1/64, 1/1024
T3, ///< 1/1, 1/4, 1/16, 1/64, 1/256, 1/1024
T4, ///< 1/1, 1/2, 1/4, 1/8, 1/16, 1/32, 1/64, 1/256, 1/1024
};
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
/*!
@brief クロックソース型
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
enum class CLOCK_SOURCE : uint8_t {
PCLK,
MTIOCA,
MTIOCB,
MTCLKA,
MTCLKB,
MTCLKC,
MTCLKD
};
};
}