source: uKadecot/trunk/ssp/arch/rx630_ccrx/prc_sil.h@ 101

Last change on this file since 101 was 101, checked in by coas-nagasima, 8 years ago

TOPPERS/uKadecotのソースコードを追加

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/plain
File size: 2.9 KB
Line 
1/*
2 * TOPPERS Software
3 * Toyohashi Open Platform for Embedded Real-Time Systems
4 *
5 * Copyright (C) 2008-2010 by Witz Corporation, JAPAN
6 *
7 * ã‹L’˜ìŒ ŽÒ‚́CˆÈ‰º‚Ì(1)`(4)‚ÌðŒ‚ð–ž‚½‚·ê‡‚ÉŒÀ‚èC–{ƒ\ƒtƒgƒEƒF
8 * ƒAi–{ƒ\ƒtƒgƒEƒFƒA‚ð‰ü•Ï‚µ‚½‚à‚Ì‚ðŠÜ‚ށDˆÈ‰º“¯‚¶j‚ðŽg—pE•¡»E‰ü
9 * •ÏEÄ”z•ziˆÈ‰ºC—˜—p‚ƌĂԁj‚·‚邱‚Ƃ𖳏ž‚Å‹–‘ø‚·‚éD
10 * (1) –{ƒ\ƒtƒgƒEƒFƒA‚ðƒ\[ƒXƒR[ƒh‚ÌŒ`‚Å—˜—p‚·‚éê‡‚ɂ́Cã‹L‚Ì’˜ì
11 * Œ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’肪C‚»‚Ì‚Ü‚Ü‚ÌŒ`‚Ń\[
12 * ƒXƒR[ƒh’†‚ÉŠÜ‚Ü‚ê‚Ä‚¢‚邱‚ƁD
13 * (2) –{ƒ\ƒtƒgƒEƒFƒA‚ðCƒ‰ƒCƒuƒ‰ƒŠŒ`Ž®‚ȂǁC‘¼‚̃\ƒtƒgƒEƒFƒAŠJ”­‚ÉŽg
14 * —p‚Å‚«‚éŒ`‚ōĔz•z‚·‚éê‡‚ɂ́CÄ”z•z‚É”º‚¤ƒhƒLƒ…
15ƒƒ“ƒgi—˜—p
16 * ŽÒƒ}ƒjƒ…
17ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜ìŒ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L
18 * ‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
19 * (3) –{ƒ\ƒtƒgƒEƒFƒA‚ðC‹@Ší‚É‘g‚ݍž‚ނȂǁC‘¼‚̃\ƒtƒgƒEƒFƒAŠJ”­‚ÉŽg
20 * —p‚Å‚«‚È‚¢Œ`‚ōĔz•z‚·‚éê‡‚ɂ́CŽŸ‚Ì‚¢‚¸‚ê‚©‚ÌðŒ‚ð–ž‚½‚·‚±
21 * ‚ƁD
22 * (a) Ä”z•z‚É”º‚¤ƒhƒLƒ…
23ƒƒ“ƒgi—˜—pŽÒƒ}ƒjƒ…
24ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜
25 * ìŒ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
26 * (b) Ä”z•z‚ÌŒ`‘Ô‚ðC•Ê‚É’è‚ß‚é•û–@‚É‚æ‚Á‚āCTOPPERSƒvƒƒWƒFƒNƒg‚É
27 * •ñ‚·‚邱‚ƁD
28 * (4) –{ƒ\ƒtƒgƒEƒFƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚é‚¢‚©‚Ȃ鑹
29 * ŠQ‚©‚ç‚àCã‹L’˜ìŒ ŽÒ‚¨‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚ð–Ɛӂ·‚邱‚ƁD
30 * ‚Ü‚½C–{ƒ\ƒtƒgƒEƒFƒA‚̃†[ƒU‚Ü‚½‚̓Gƒ“ƒhƒ†[ƒU‚©‚ç‚Ì‚¢‚©‚Ȃ闝
31 * —R‚ÉŠî‚­¿‹‚©‚ç‚àCã‹L’˜ìŒ ŽÒ‚¨‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚ð
32 * –Ɛӂ·‚邱‚ƁD
33 *
34 * –{ƒ\ƒtƒgƒEƒFƒA‚́C–³•ÛØ‚Å’ñ‹Ÿ‚³‚ê‚Ä‚¢‚é‚à‚Ì‚Å‚ ‚éDã‹L’˜ìŒ ŽÒ‚¨
35 * ‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚́C–{ƒ\ƒtƒgƒEƒFƒA‚ÉŠÖ‚µ‚āC“Á’è‚ÌŽg—p–Ú“I
36 * ‚ɑ΂·‚é“K‡«‚àŠÜ‚߂āC‚¢‚©‚È‚é•ÛØ‚às‚í‚È‚¢D‚Ü‚½C–{ƒ\ƒtƒgƒEƒF
37 * ƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚½‚¢‚©‚Ȃ鑹ŠQ‚ÉŠÖ‚µ‚Ä‚àC‚»
38 * ‚̐ӔC‚𕉂í‚È‚¢D
39 *
40 */
41
42/*
43 * sil.h‚̃vƒƒZƒbƒTˆË‘¶•”iRX630—pj
44 */
45
46#ifndef TOPPERS_PRC_SIL_H
47#define TOPPERS_PRC_SIL_H
48
49
50#ifndef TOPPERS_MACRO_ONLY
51#include "prc_insn.h"
52
53
54/*
55 * ‘SŠ„ž‚Ý‹ÖŽ~
56 */
57Inline uint32_t
58TOPPERS_disint( void )
59{
60 volatile uint32_t TOPPERS_psw;
61
62 TOPPERS_psw = current_psw();
63 disint();
64
65 return( TOPPERS_psw );
66}
67
68
69/*
70 * ‘SŠ„ž‚Ý‹–‰Â
71 */
72Inline void
73TOPPERS_enaint( uint32_t TOPPERS_psw )
74{
75 if( TOPPERS_psw & PSW_I_MASK ){
76 enaint();
77 }
78}
79
80
81/*
82 * ‘SŠ„ž‚݃ƒbƒNó‘Ԃ̐§Œä
83 */
84#define SIL_PRE_LOC uint32_t TOPPERS_i_psw;
85#define SIL_LOC_INT() ( ( void )( TOPPERS_i_psw = TOPPERS_disint() ) )
86#define SIL_UNL_INT() ( TOPPERS_enaint( TOPPERS_i_psw ) )
87
88
89/*
90 * ƒGƒ“ƒfƒBƒAƒ“‚Ì”½“]
91 *
92 * –{ŠJ”­ŠÂ‹«‚ł̓Gƒ“ƒfƒBƒAƒ“•ÏŠ·–½—ß‚ª‘¶Ý‚·‚邽‚ß,
93 * ƒA[ƒLƒeƒNƒ`ƒƒˆË‘¶•”‚ɂă}ƒNƒ‚ðã‘‚«‚·‚é.
94 */
95#define TOPPERS_SIL_REV_ENDIAN_UINT16( data ) \
96 rev_endian_uint16( data )
97#define TOPPERS_SIL_REV_ENDIAN_UINT32( data ) \
98 rev_endian_uint32( data )
99
100
101/*
102 * ”÷­ŽžŠÔ‘Ò‚¿
103 */
104extern void sil_dly_nse( ulong_t dlytim );
105
106#endif /* TOPPERS_MACRO_ONLY */
107
108
109/*
110 * ƒvƒƒZƒbƒT‚̃Gƒ“ƒfƒBƒAƒ“
111 */
112#define SIL_ENDIAN_LITTLE /* ƒŠƒgƒ‹ƒGƒ“ƒfƒBƒAƒ“ */
113
114
115#endif /* TOPPERS_PRC_SIL_H */
Note: See TracBrowser for help on using the repository browser.