source: ssp_qb_r5f100le_cs/trunk/arch/rl78_ca78k0r/prc_sil.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.3 KB
Line 
1/*
2 * TOPPERS Software
3 * Toyohashi Open Platform for Embedded Real-Time Systems
4 *
5 * Copyright (C) 2008 by Witz Corporation, JAPAN
6 * Copyright (C) 2014 by Naoki Saito
7 * Nagoya Municipal Industrial Research Institute, JAPAN
8 *
9 * ã‹L’˜ìŒ ŽÒ‚́CˆÈ‰º‚Ì(1)`(4)‚ÌðŒ‚ð–ž‚½‚·ê‡‚ÉŒÀ‚èC–{ƒ\ƒtƒgƒEƒF
10 * ƒAi–{ƒ\ƒtƒgƒEƒFƒA‚ð‰ü•Ï‚µ‚½‚à‚Ì‚ðŠÜ‚ށDˆÈ‰º“¯‚¶j‚ðŽg—pE•¡»E‰ü
11 * •ÏEÄ”z•ziˆÈ‰ºC—˜—p‚ƌĂԁj‚·‚邱‚Ƃ𖳏ž‚Å‹–‘ø‚·‚éD
12 * (1) –{ƒ\ƒtƒgƒEƒFƒA‚ðƒ\[ƒXƒR[ƒh‚ÌŒ`‚Å—˜—p‚·‚éê‡‚ɂ́Cã‹L‚Ì’˜ì
13 * Œ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’肪C‚»‚Ì‚Ü‚Ü‚ÌŒ`‚Ń\[
14 * ƒXƒR[ƒh’†‚ÉŠÜ‚Ü‚ê‚Ä‚¢‚邱‚ƁD
15 * (2) –{ƒ\ƒtƒgƒEƒFƒA‚ðCƒ‰ƒCƒuƒ‰ƒŠŒ`Ž®‚ȂǁC‘¼‚̃\ƒtƒgƒEƒFƒAŠJ”­‚ÉŽg
16 * —p‚Å‚«‚éŒ`‚ōĔz•z‚·‚éê‡‚ɂ́CÄ”z•z‚É”º‚¤ƒhƒLƒ…
17ƒƒ“ƒgi—˜—p
18 * ŽÒƒ}ƒjƒ…
19ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜ìŒ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L
20 * ‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
21 * (3) –{ƒ\ƒtƒgƒEƒFƒA‚ðC‹@Ší‚É‘g‚ݍž‚ނȂǁC‘¼‚̃\ƒtƒgƒEƒFƒAŠJ”­‚ÉŽg
22 * —p‚Å‚«‚È‚¢Œ`‚ōĔz•z‚·‚éê‡‚ɂ́CŽŸ‚Ì‚¢‚¸‚ê‚©‚ÌðŒ‚ð–ž‚½‚·‚±
23 * ‚ƁD
24 * (a) Ä”z•z‚É”º‚¤ƒhƒLƒ…
25ƒƒ“ƒgi—˜—pŽÒƒ}ƒjƒ…
26ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜
27 * ìŒ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
28 * (b) Ä”z•z‚ÌŒ`‘Ô‚ðC•Ê‚É’è‚ß‚é•û–@‚É‚æ‚Á‚āCTOPPERSƒvƒƒWƒFƒNƒg‚É
29 * •ñ‚·‚邱‚ƁD
30 * (4) –{ƒ\ƒtƒgƒEƒFƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚é‚¢‚©‚Ȃ鑹
31 * ŠQ‚©‚ç‚àCã‹L’˜ìŒ ŽÒ‚¨‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚ð–Ɛӂ·‚邱‚ƁD
32 * ‚Ü‚½C–{ƒ\ƒtƒgƒEƒFƒA‚̃†[ƒU‚Ü‚½‚̓Gƒ“ƒhƒ†[ƒU‚©‚ç‚Ì‚¢‚©‚Ȃ闝
33 * —R‚ÉŠî‚­¿‹‚©‚ç‚àCã‹L’˜ìŒ ŽÒ‚¨‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚ð
34 * –Ɛӂ·‚邱‚ƁD
35 *
36 * –{ƒ\ƒtƒgƒEƒFƒA‚́C–³•ÛØ‚Å’ñ‹Ÿ‚³‚ê‚Ä‚¢‚é‚à‚Ì‚Å‚ ‚éDã‹L’˜ìŒ ŽÒ‚¨
37 * ‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚́C–{ƒ\ƒtƒgƒEƒFƒA‚ÉŠÖ‚µ‚āC“Á’è‚ÌŽg—p–Ú“I
38 * ‚ɑ΂·‚é“K‡«‚àŠÜ‚߂āC‚¢‚©‚È‚é•ÛØ‚às‚í‚È‚¢D‚Ü‚½C–{ƒ\ƒtƒgƒEƒF
39 * ƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚½‚¢‚©‚Ȃ鑹ŠQ‚ÉŠÖ‚µ‚Ä‚àC‚»
40 * ‚̐ӔC‚𕉂í‚È‚¢D
41 *
42 */
43
44/*
45 * sil.h ƒvƒƒZƒbƒTˆË‘¶•”(RL78ƒtƒ@ƒ~ƒŠ‹¤’Ê•”•ª)
46 */
47
48#ifndef TOPPERS_PRC_SIL_H
49#define TOPPERS_PRC_SIL_H
50
51/*
52 * ƒRƒ“ƒpƒCƒ‰‚ª Inline ‚ðƒTƒ|[ƒg‚µ‚È‚¢‚½‚ß
53 * •W€‚̃ƒ‚ƒŠ‹óŠÔƒAƒNƒZƒXŠÖ”‚ðŽg—p‚µ‚È‚¢
54 */
55#define TOPPERS_OMIT_SIL_ACCESS
56
57/*
58 * PSW ƒŒƒWƒXƒ^
59 */
60#define PSW_IE_MASK (0x80)
61#define PSW_ISP_MASK (0x06)
62
63// psw ‚Ì ISP{0,1} •”•ª‚¾‚¯‚ðŽæ‚èo‚·
64#define PSW2ISP(psw) ((uint8_t)((psw) & PSW_ISP_MASK))
65// psw ‚Ì ISP{0,1} ‚̃rƒbƒgˆÊ’u‚É isp ‚ðƒZƒbƒg‚µ‚½ƒpƒ^[ƒ“‚ðì‚é
66#define PSW_SET_ISP(psw, isp) ((uint8_t)((uint8_t)(psw & ~PSW_ISP_MASK) | isp))
67
68
69#ifndef TOPPERS_MACRO_ONLY
70
71// PSW‚̎擾EÝ’è
72extern uint8_t get_psw(void);
73extern void set_psw(uint8_t psw);
74
75/*
76 * NMI‚ðœ‚­‚·‚ׂĂ̊„ž‚Ý‚Ì‹ÖŽ~(prc_config.c)
77 */
78extern uint8_t TOPPERS_disint(void);
79
80/*
81 * Š„ž‚Ý—Dæ“xƒ}ƒXƒNi“à•”•\Œ»j‚ÌŒ»Ý’l‚̐ݒè(prc_config.c)
82 */
83extern void TOPPERS_enaint(uint8_t TOPPERS_psw);
84
85/*
86 * ‘SŠ„ž‚݃ƒbƒNó‘Ԃ̐§Œä
87 */
88#define SIL_PRE_LOC uint8_t TOPPERS_ie_psw;
89#define SIL_LOC_INT() ((void)(TOPPERS_ie_psw = TOPPERS_disint()))
90#define SIL_UNL_INT() (TOPPERS_enaint(TOPPERS_ie_psw))
91
92/*
93 * ”÷­ŽžŠÔ‘Ò‚¿(target_support.asm, not yet)
94 */
95extern void sil_dly_nse(ulong_t dlytim);
96
97#endif /* TOPPERS_MACRO_ONLY */
98
99/*
100 * ƒvƒƒZƒbƒT‚̃Gƒ“ƒfƒBƒAƒ“
101 */
102#define SIL_ENDIAN_LITTLE /* ƒŠƒgƒ‹ƒGƒ“ƒfƒBƒAƒ“ */
103
104#endif /* TOPPERS_PRC_SIL_H */
Note: See TracBrowser for help on using the repository browser.