source: ssp_qb_r5f100le_cs/trunk/target/cq_frk_fm3_gcc/target_serial.h@ 93

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

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

File size: 4.1 KB
Line 
1/*
2 * TOPPERS/SSP Kernel
3 * Smallest Set Profile Kernel
4 *
5 * Copyright (C) 2007 by Embedded and Real-Time Systems Laboratory
6 * Graduate School of Information Science, Nagoya Univ., JAPAN
7 * Copyright (C) 2015 by Naoki Saito
8 * Nagoya Municipal Industrial Research Institute, JAPAN
9 *
10 * ã‹L’˜ìŒ ŽÒ‚́CˆÈ‰º‚Ì(1)`(4)‚ÌðŒ‚ð–ž‚½‚·ê‡‚ÉŒÀ‚èC–{ƒ\ƒtƒgƒEƒF
11 * ƒAi–{ƒ\ƒtƒgƒEƒFƒA‚ð‰ü•Ï‚µ‚½‚à‚Ì‚ðŠÜ‚ށDˆÈ‰º“¯‚¶j‚ðŽg—pE•¡»E‰ü
12 * •ÏEÄ”z•ziˆÈ‰ºC—˜—p‚ƌĂԁj‚·‚邱‚Ƃ𖳏ž‚Å‹–‘ø‚·‚éD
13 * (1) –{ƒ\ƒtƒgƒEƒFƒA‚ðƒ\[ƒXƒR[ƒh‚ÌŒ`‚Å—˜—p‚·‚éê‡‚ɂ́Cã‹L‚Ì’˜ì
14 * Œ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’肪C‚»‚Ì‚Ü‚Ü‚ÌŒ`‚Ń\[
15 * ƒXƒR[ƒh’†‚ÉŠÜ‚Ü‚ê‚Ä‚¢‚邱‚ƁD
16 * (2) –{ƒ\ƒtƒgƒEƒFƒA‚ðCƒ‰ƒCƒuƒ‰ƒŠŒ`Ž®‚ȂǁC‘¼‚̃\ƒtƒgƒEƒFƒAŠJ”­‚ÉŽg
17 * —p‚Å‚«‚éŒ`‚ōĔz•z‚·‚éê‡‚ɂ́CÄ”z•z‚É”º‚¤ƒhƒLƒ…
18ƒƒ“ƒgi—˜—p
19 * ŽÒƒ}ƒjƒ…
20ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜ìŒ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L
21 * ‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
22 * (3) –{ƒ\ƒtƒgƒEƒFƒA‚ðC‹@Ší‚É‘g‚ݍž‚ނȂǁC‘¼‚̃\ƒtƒgƒEƒFƒAŠJ”­‚ÉŽg
23 * —p‚Å‚«‚È‚¢Œ`‚ōĔz•z‚·‚éê‡‚ɂ́CŽŸ‚Ì‚¢‚¸‚ê‚©‚ÌðŒ‚ð–ž‚½‚·‚±
24 * ‚ƁD
25 * (a) Ä”z•z‚É”º‚¤ƒhƒLƒ…
26ƒƒ“ƒgi—˜—pŽÒƒ}ƒjƒ…
27ƒAƒ‹‚Ȃǁj‚ɁCã‹L‚Ì’˜
28 * ìŒ •\Ž¦C‚±‚Ì—˜—pðŒ‚¨‚æ‚щº‹L‚Ì–³•ÛØ‹K’è‚ðŒfÚ‚·‚邱‚ƁD
29 * (b) Ä”z•z‚ÌŒ`‘Ô‚ðC•Ê‚É’è‚ß‚é•û–@‚É‚æ‚Á‚āCTOPPERSƒvƒƒWƒFƒNƒg‚É
30 * •ñ‚·‚邱‚ƁD
31 * (4) –{ƒ\ƒtƒgƒEƒFƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚é‚¢‚©‚Ȃ鑹
32 * ŠQ‚©‚ç‚àCã‹L’˜ìŒ ŽÒ‚¨‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚ð–Ɛӂ·‚邱‚ƁD
33 * ‚Ü‚½C–{ƒ\ƒtƒgƒEƒFƒA‚̃†[ƒU‚Ü‚½‚̓Gƒ“ƒhƒ†[ƒU‚©‚ç‚Ì‚¢‚©‚Ȃ闝
34 * —R‚ÉŠî‚­¿‹‚©‚ç‚àCã‹L’˜ìŒ ŽÒ‚¨‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚ð
35 * –Ɛӂ·‚邱‚ƁD
36 *
37 * –{ƒ\ƒtƒgƒEƒFƒA‚́C–³•ÛØ‚Å’ñ‹Ÿ‚³‚ê‚Ä‚¢‚é‚à‚Ì‚Å‚ ‚éDã‹L’˜ìŒ ŽÒ‚¨
38 * ‚æ‚ÑTOPPERSƒvƒƒWƒFƒNƒg‚́C–{ƒ\ƒtƒgƒEƒFƒA‚ÉŠÖ‚µ‚āC“Á’è‚ÌŽg—p–Ú“I
39 * ‚ɑ΂·‚é“K‡«‚àŠÜ‚߂āC‚¢‚©‚È‚é•ÛØ‚às‚í‚È‚¢D‚Ü‚½C–{ƒ\ƒtƒgƒEƒF
40 * ƒA‚Ì—˜—p‚É‚æ‚è’¼Ú“I‚Ü‚½‚͊ԐړI‚ɐ¶‚¶‚½‚¢‚©‚Ȃ鑹ŠQ‚ÉŠÖ‚µ‚Ä‚àC‚»
41 * ‚̐ӔC‚𕉂í‚È‚¢D
42 *
43 */
44
45/*
46 * ƒVƒŠƒAƒ‹I/OƒfƒoƒCƒXiSIOjƒhƒ‰ƒCƒo(CQ-FRM-FM3—p)
47 */
48
49#ifndef TOPPERS_TARGET_SERIAL_H
50#define TOPPERS_TARGET_SERIAL_H
51
52#include "cq_frm_fm3.h"
53#include "target_syssvc.h"
54
55/*
56 * SIO‚ÌŠ„ž‚݃xƒNƒ^”ԍ†
57 */
58#if (SIO_PORTID == 1)
59#define INHNO_SIO_TX INT_MFS0_TX
60#define INTNO_SIO_TX INT_MFS0_TX
61#define INHNO_SIO_RX INT_MFS0_RX
62#define INTNO_SIO_RX INT_MFS0_RX
63#elif (SIO_PORTID == 2)
64#define INHNO_SIO_TX INT_MFS4_TX
65#define INTNO_SIO_TX INT_MFS4_TX
66#define INHNO_SIO_RX INT_MFS4_RX
67#define INTNO_SIO_RX INT_MFS4_RX
68#endif
69#define INTPRI_SIO -3 /* Š„ž‚Ý—Dæ“x */
70#define INTATR_SIO 0 /* Š„ž‚Ý‘®« */
71
72/*
73 * ƒR[ƒ‹ƒoƒbƒNƒ‹[ƒ`ƒ“‚ÌŽ¯•Ê”ԍ†
74 */
75#define SIO_RDY_SND 1U /* ‘—M‰Â”\ƒR[ƒ‹ƒoƒbƒN */
76#define SIO_RDY_RCV 2U /* ŽóM’Ê’mƒR[ƒ‹ƒoƒbƒN */
77
78#ifndef TOPPERS_MACRO_ONLY
79
80/*
81 * ƒVƒŠƒAƒ‹ƒ|[ƒg‚ÌŠÇ—ƒuƒƒbƒN
82 */
83typedef struct sio_port_control_block {
84 ID port;
85 uint32_t reg;
86 intptr_t exinf;
87} SIOPCB;
88
89/*
90 * SIO‰Šú‰»
91 */
92extern void sio_initialize(intptr_t exinf);
93
94/*
95 * ƒVƒŠƒAƒ‹ƒI[ƒvƒ“
96 */
97extern SIOPCB *sio_opn_por(ID siopid, intptr_t exinf);
98
99/*
100 * ƒVƒŠƒAƒ‹ƒNƒ[ƒY
101 */
102extern void sio_cls_por(SIOPCB *p_siopcb);
103
104/*
105 * Š„ž‚݃nƒ“ƒhƒ‰
106 */
107extern void sio_isr_tx(intptr_t exinf);
108extern void sio_isr_rx(intptr_t exinf);
109
110/*
111 * 1•¶Žš‘—M
112 */
113extern bool_t sio_snd_chr(SIOPCB *siopcb, char c);
114
115/*
116 * 1•¶ŽšŽóM
117 */
118extern int_t sio_rcv_chr(SIOPCB *siopcb);
119
120/*
121 * ƒR[ƒ‹ƒoƒbƒN‚Ì‹–‰Â
122 */
123extern void sio_ena_cbr(SIOPCB *siopcb, uint_t cbrtn);
124
125/*
126 * ƒR[ƒ‹ƒoƒbƒN‚Ì‹ÖŽ~
127 */
128extern void sio_dis_cbr(SIOPCB *siopcb, uint_t cbrtn);
129
130/*
131 * ‘—M‰Â”\ƒR[ƒ‹ƒoƒbƒN
132 */
133extern void sio_irdy_snd(intptr_t exinf);
134
135/*
136 * ŽóM’Ê’mƒR[ƒ‹ƒoƒbƒN
137 */
138extern void sio_irdy_rcv(intptr_t exinf);
139
140/*
141 * 1•¶Žš‘—Miƒ|[ƒŠƒ“ƒO‚ł̏o—́j
142 */
143extern void sio_pol_snd_chr(char c, ID siopid);
144
145/*
146 * ƒ^[ƒQƒbƒg‚̃VƒŠƒAƒ‹‰Šú‰»
147 */
148extern void target_usart_init(ID siopid);
149
150/*
151 * ’჌ƒxƒ‹o—͏‰Šú‰»
152 */
153extern void target_low_output_init(ID siopid);
154
155#endif /* TOPPERS_MACRO_ONLY */
156#endif /* TOPPERS_TARGET_SERIAL_H */
Note: See TracBrowser for help on using the repository browser.