source: ssp_qb_r5f100le_cs/trunk/target/qb_r5f100le_cs/target_timer.h@ 93

Last change on this file since 93 was 93, checked in by nmir-saito, 8 years ago

add Combined package of SSP kernel for QB-R5F100LE-TB(RL78 processor)

File size: 3.6 KB
Line 
1/*
2 * TOPPERS/ASP Kernel
3 * Toyohashi Open Platform for Embedded Real-Time Systems/
4 * Advanced Standard Profile Kernel
5 *
6 * Copyright (C) 2007 by Embedded and Real-Time Systems Laboratory
7 * Graduate School of Information Science, Nagoya Univ., JAPAN
8 * Copyright (C) 2011-2014 by Naoki Saito
9 * Nagoya Municipal Industrial Research Institute, JAPAN
10 *
11 * ã‹L’˜ìŒ ŽÒ‚́CˆÈ‰º‚Ì(1)`(4)‚ÌðŒ‚ð–ž‚½‚·ê‡‚ÉŒÀ‚èC–{ƒ\ƒtƒgƒEƒF
12 * ƒAi–{ƒ\ƒtƒgƒEƒFƒA‚ð‰ü•Ï‚µ‚½‚à‚Ì‚ðŠÜ‚ށDˆÈ‰º“¯‚¶j‚ðŽg—pE•¡»E‰ü
13 * •ÏEÄ”z•ziˆÈ‰ºC—˜—p‚ƌĂԁj‚·‚邱‚Ƃ𖳏ž‚Å‹–‘ø‚·‚éD
14 * (1) –{ƒ\ƒtƒgƒEƒFƒA‚ðƒ\[ƒXƒR[ƒh‚ÌŒ`‚Å—˜—p‚·‚éê‡‚ɂ́Cã‹L‚Ì’˜ì
15 * Œ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’肪C‚»‚Ì‚Ü‚Ü‚ÌŒ`‚Ń\[
16 * ƒXƒR[ƒh’†‚ÉŠÜ‚Ü‚ê‚Ä‚¢‚邱‚ƁD
17 * (2) –{ƒ\ƒtƒgƒEƒFƒA‚ðCƒ‰ƒCƒuƒ‰ƒŠŒ`Ž®‚ȂǁC‘¼‚̃\ƒtƒgƒEƒFƒAŠJ”­‚ÉŽg
18 * —p‚Å‚«‚éŒ`‚ōĔz•z‚·‚éê‡‚ɂ́CÄ”z•z‚É”º‚¤ƒhƒLƒ…
19ƒƒ“ƒgi—˜—p
20 * ŽÒƒ}ƒjƒ…
21ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜ìŒ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L
22 * ‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
23 * (3) –{ƒ\ƒtƒgƒEƒFƒA‚ðC‹@Ší‚É‘g‚ݍž‚ނȂǁC‘¼‚̃\ƒtƒgƒEƒFƒAŠJ”­‚ÉŽg
24 * —p‚Å‚«‚È‚¢Œ`‚ōĔz•z‚·‚éê‡‚ɂ́CŽŸ‚Ì‚¢‚¸‚ê‚©‚ÌðŒ‚ð–ž‚½‚·‚±
25 * ‚ƁD
26 * (a) Ä”z•z‚É”º‚¤ƒhƒLƒ…
27ƒƒ“ƒgi—˜—pŽÒƒ}ƒjƒ…
28ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜
29 * ìŒ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
30 * (b) Ä”z•z‚ÌŒ`‘Ô‚ðC•Ê‚É’è‚ß‚é•û–@‚É‚æ‚Á‚āCTOPPERSƒvƒƒWƒFƒNƒg‚É
31 * •ñ‚·‚邱‚ƁD
32 * (4) –{ƒ\ƒtƒgƒEƒFƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚é‚¢‚©‚Ȃ鑹
33 * ŠQ‚©‚ç‚àCã‹L’˜ìŒ ŽÒ‚¨‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚ð–Ɛӂ·‚邱‚ƁD
34 * ‚Ü‚½C–{ƒ\ƒtƒgƒEƒFƒA‚̃†[ƒU‚Ü‚½‚̓Gƒ“ƒhƒ†[ƒU‚©‚ç‚Ì‚¢‚©‚Ȃ闝
35 * —R‚ÉŠî‚­¿‹‚©‚ç‚àCã‹L’˜ìŒ ŽÒ‚¨‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚ð
36 * –Ɛӂ·‚邱‚ƁD
37 *
38 * –{ƒ\ƒtƒgƒEƒFƒA‚́C–³•ÛØ‚Å’ñ‹Ÿ‚³‚ê‚Ä‚¢‚é‚à‚Ì‚Å‚ ‚éDã‹L’˜ìŒ ŽÒ‚¨
39 * ‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚́C–{ƒ\ƒtƒgƒEƒFƒA‚ÉŠÖ‚µ‚āC“Á’è‚ÌŽg—p–Ú“I
40 * ‚ɑ΂·‚é“K‡«‚àŠÜ‚߂āC‚¢‚©‚È‚é•ÛØ‚às‚í‚È‚¢D‚Ü‚½C–{ƒ\ƒtƒgƒEƒF
41 * ƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚½‚¢‚©‚Ȃ鑹ŠQ‚ÉŠÖ‚µ‚Ä‚àC‚»
42 * ‚̐ӔC‚𕉂í‚È‚¢D
43 *
44 */
45
46/*
47 * ƒ^ƒCƒ}ƒhƒ‰ƒCƒoiQB-R5F100LE—pj
48 */
49
50#ifndef TOPPERS_TARGET_TIMER_H
51#define TOPPERS_TARGET_TIMER_H
52
53#include <sil.h>
54
55/*
56 * ƒ^ƒCƒ}Š„ž‚݃nƒ“ƒhƒ‰“o˜^‚Ì‚½‚߂̒萔
57 */
58#define INTNO_TIMER INTNO_INTTM00 /* Š„ž‚ݔԍ† */
59#define INHNO_TIMER INHNO_INTTM00 /* Š„ž‚݃nƒ“ƒhƒ‰”ԍ† */
60#define INTPRI_TIMER (-2) /* Š„ž‚Ý—Dæ“x */
61
62/*
63 * ƒ^ƒCƒ}’l‚Ì“à•”•\Œ»‚ÆÐؕb’PˆÊ‚Æ‚Ì•ÏŠ·
64 */
65#define TIMER_CLOCK UINT16_C(5000) /* ƒVƒXƒeƒ€ƒNƒƒbƒN 20MHzCƒJƒEƒ“ƒgƒ\[ƒX f4 ‚Ì‚Æ‚«C
66 1ms ‚̓^ƒCƒ}ƒJƒEƒ“ƒ^ 5000ƒJƒEƒ“ƒg•ª */
67
68/*
69 * ƒ^ƒCƒ}’l‚Ì“à•”•\Œ»‚ƃ~ƒŠ•bEƒÊ•b’PˆÊ‚Æ‚Ì•ÏŠ·
70 *
71 */
72#define TO_CLOCK(nume, deno) ((CLOCK)(TIMER_CLOCK * (nume) / (deno)))
73#define TO_USEC(clock) (((SYSUTM) clock) * 1000U / TIMER_CLOCK)
74
75
76#ifndef TOPPERS_MACRO_ONLY
77
78/*
79 * ƒ^ƒCƒ}’l‚Ì“à•”•\Œ»‚ÌŒ^
80 */
81typedef uint16_t CLOCK;
82
83/*
84 * ƒ^ƒCƒ}‚Ì‹N“®ˆ—
85 *
86 * ƒ^ƒCƒ}‚ð‰Šú‰»‚µCŽüŠú“I‚ȃ^ƒCƒ}Š„ž‚Ý—v‹‚𔭐¶‚³‚¹‚éD
87 */
88extern void target_timer_initialize(intptr_t exinf);
89
90/*
91 * ƒ^ƒCƒ}‚Ì’âŽ~ˆ—
92 *
93 * ƒ^ƒCƒ}‚Ì“®ì‚ð’âŽ~‚³‚¹‚éD
94 */
95extern void target_timer_terminate(intptr_t exinf);
96
97#if 0
98/*
99 * ƒ^ƒCƒ}‚ÌŒ»Ý’l‚̓Ǐo‚µ(not yet)
100 */
101Inline CLOCK
102target_timer_get_current(void)
103{
104 return(0);
105}
106
107/*
108 * ƒ^ƒCƒ}Š„ž‚Ý—v‹‚̃`ƒFƒbƒN(not yet)
109 */
110Inline bool_t
111target_timer_probe_int(void)
112{
113 return(0);
114}
115#endif
116
117/*
118 * ƒ^ƒCƒ}Š„ž‚݃nƒ“ƒhƒ‰
119 */
120extern void target_timer_handler(void);
121
122#endif /* TOPPERS_MACRO_ONLY */
123#endif /* TOPPERS_TARGET_TIMER_H */
Note: See TracBrowser for help on using the repository browser.