-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtimer_rj.hpp
119 lines (101 loc) · 3.37 KB
/
timer_rj.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#pragma once
//=====================================================================//
/*! @file
@brief R8C/M110AN, R8C/M120AN グループ・タイマーRJレジスター定義
@author 平松邦仁 ([email protected])
@copyright Copyright (C) 2014, 2017 Kunihito Hiramatsu @n
Released under the MIT license @n
https://github.com/hirakuni45/R8C/blob/master/LICENSE
*/
//=====================================================================//
#include "common/io_utils.hpp"
namespace device {
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
/*!
@brief タイマRJカウンタレジスタ TRJ
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
static rw16_t<0x00D8> TRJ;
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
/*!
@brief タイマRJ制御レジスタ TRJCR
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
struct trjcr_t : public rw8_t<0x00DA> {
typedef rw8_t<0x00DA> io_;
using io_::operator =;
using io_::operator ();
using io_::operator |=;
using io_::operator &=;
bit_rw_t<io_, bitpos::B0> TSTART;
bit_rw_t<io_, bitpos::B1> TCSTF;
bit_rw_t<io_, bitpos::B2> TSTOP;
bit_rw_t<io_, bitpos::B4> TEDGF;
bit_rw_t<io_, bitpos::B5> TUNDF;
};
static trjcr_t TRJCR;
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
/*!
@brief タイマRJ I/O 制御レジスタ TRJIOC
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
struct trjioc_t : public rw8_t<0x00DB> {
typedef rw8_t<0x00DB> io_;
using io_::operator =;
using io_::operator ();
using io_::operator |=;
using io_::operator &=;
bit_rw_t <io_, bitpos::B0> TEDGSEL;
bit_rw_t <io_, bitpos::B1> TOPCR;
bits_rw_t<io_, bitpos::B4, 2> TIPF;
bits_rw_t<io_, bitpos::B6, 2> TIOGT;
};
static trjioc_t TRJIOC;
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
/*!
@brief タイマRJモードレジスタ TRJMR
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
struct trjmr_t : public rw8_t<0x00DC> {
typedef rw8_t<0x00DC> io_;
using io_::operator =;
using io_::operator ();
using io_::operator |=;
using io_::operator &=;
bits_rw_t<io_, bitpos::B0, 3> TMOD;
bit_rw_t <io_, bitpos::B3> TEDGPL;
bits_rw_t<io_, bitpos::B4, 3> TCK;
bit_rw_t <io_, bitpos::B7> TCKCUT;
};
static trjmr_t TRJMR;
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
/*!
@brief タイマRJイベント選択レジスタ TRJISR
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
struct trjisr_t : public rw8_t<0x00DD> {
typedef rw8_t<0x00DD> io_;
using io_::operator =;
using io_::operator ();
using io_::operator |=;
using io_::operator &=;
bits_rw_t<io_, bitpos::B0, 2> RCCPSEL;
bit_rw_t <io_, bitpos::B2> RCCPSEL2;
};
static trjisr_t TRJISR;
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
/*!
@brief タイマRJ割り込み制御レジスタ TRJIR
*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
struct trjir_t : public rw8_t<0x00DE> {
typedef rw8_t<0x00DE> io_;
using io_::operator =;
using io_::operator ();
using io_::operator |=;
using io_::operator &=;
bit_rw_t<io_, bitpos::B6> TRJIF;
bit_rw_t<io_, bitpos::B7> TRJIE;
};
static trjir_t TRJIR;
}