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 | *
|
---|
9 | * ãLì ÒÍCȺÌ(1)`(4)Ìðð½·êÉÀèC{\tgEF
|
---|
10 | * Ai{\tgEFAðüϵ½àÌðÜÞDȺ¯¶jðgpE¡»Eü
|
---|
11 | * ÏEÄzziȺCpÆÄÔj·é±Æð³Åø·éD
|
---|
12 | * (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
|
---|
13 | * \¦C±Ìpð¨æѺL̳ÛØKèªC»ÌÜÜÌ`Å\[
|
---|
14 | * XR[hÉÜÜêÄ¢é±ÆD
|
---|
15 | * (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJÉg
|
---|
16 | * pÅ«é`ÅÄzz·éêÉÍCÄzzɺ¤hL
|
---|
17 | gip
|
---|
18 | * Ò}j
|
---|
19 | AÈÇjÉCãLÌì \¦C±Ìpð¨æѺL
|
---|
20 | * ̳ÛØKèðfÚ·é±ÆD
|
---|
21 | * (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJÉg
|
---|
22 | * pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
|
---|
23 | * ÆD
|
---|
24 | * (a) Äzzɺ¤hL
|
---|
25 | gipÒ}j
|
---|
26 | AÈÇjÉCãLÌ
|
---|
27 | * ì \¦C±Ìpð¨æѺL̳ÛØKèðfÚ·é±ÆD
|
---|
28 | * (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
|
---|
29 | * ñ·é±ÆD
|
---|
30 | * (4) {\tgEFAÌpÉæè¼ÚIܽÍÔÚIɶ¶é¢©Èé¹
|
---|
31 | * Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
|
---|
32 | * ܽC{\tgEFAÌ[UܽÍGh[U©çÌ¢©Èé
|
---|
33 | * RÉîÿ©çàCãLì Ò¨æÑTOPPERSvWFNgð
|
---|
34 | * ÆÓ·é±ÆD
|
---|
35 | *
|
---|
36 | * {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
|
---|
37 | * æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄCÁèÌgpÚI
|
---|
38 | * ÉηéK«àÜßÄC¢©ÈéÛØàsíÈ¢DܽC{\tgEF
|
---|
39 | * AÌpÉæè¼ÚIܽÍÔÚIɶ¶½¢©Èé¹QÉÖµÄàC»
|
---|
40 | * ÌÓCðíÈ¢D
|
---|
41 | *
|
---|
42 | */
|
---|
43 |
|
---|
44 | /*
|
---|
45 | * VAI/OfoCXiSIOjhCoiFS K70pj
|
---|
46 | */
|
---|
47 |
|
---|
48 | #ifndef TOPPERS_TARGET_SERIAL_H
|
---|
49 | #define TOPPERS_TARGET_SERIAL_H
|
---|
50 |
|
---|
51 | #include "fs_k70f120m.h"
|
---|
52 |
|
---|
53 | /*
|
---|
54 | * SIOÌÝxN^Ô
|
---|
55 | */
|
---|
56 | #define INHNO_SIO IRQ_VECTOR_USART2
|
---|
57 | #define INTNO_SIO IRQ_VECTOR_USART2
|
---|
58 |
|
---|
59 | #define INTPRI_SIO -3 /* ÝDæx */
|
---|
60 | #define INTATR_SIO 0 /* Ý®« */
|
---|
61 |
|
---|
62 | #ifndef TOPPERS_MACRO_ONLY
|
---|
63 |
|
---|
64 | /*
|
---|
65 | * VA|[gÌÇubN
|
---|
66 | */
|
---|
67 | typedef struct sio_port_control_block {
|
---|
68 | ID port;
|
---|
69 | uint32_t reg;
|
---|
70 | intptr_t exinf;
|
---|
71 | } SIOPCB;
|
---|
72 |
|
---|
73 | /*
|
---|
74 | * R[obN[`̯ÊÔ
|
---|
75 | */
|
---|
76 | #define SIO_RDY_SND 1U /* MÂ\R[obN */
|
---|
77 | #define SIO_RDY_RCV 2U /* óMÊmR[obN */
|
---|
78 |
|
---|
79 | /*
|
---|
80 | * gp·éVA|[gID
|
---|
81 | */
|
---|
82 | #define SIO_PORTID (1)
|
---|
83 |
|
---|
84 | /*
|
---|
85 | * SIOú»
|
---|
86 | */
|
---|
87 | extern void sio_initialize(intptr_t exinf);
|
---|
88 |
|
---|
89 | /*
|
---|
90 | * VAI[v
|
---|
91 | */
|
---|
92 | extern SIOPCB *sio_opn_por(ID siopid, intptr_t exinf);
|
---|
93 |
|
---|
94 | /*
|
---|
95 | * VAN[Y
|
---|
96 | */
|
---|
97 | extern void sio_cls_por(SIOPCB *p_siopcb);
|
---|
98 |
|
---|
99 | /*
|
---|
100 | * Ýnh
|
---|
101 | */
|
---|
102 | extern void sio_isr(intptr_t exinf);
|
---|
103 |
|
---|
104 | /*
|
---|
105 | * 1¶M
|
---|
106 | */
|
---|
107 | extern bool_t sio_snd_chr(SIOPCB *siopcb, char c);
|
---|
108 |
|
---|
109 | /*
|
---|
110 | * 1¶óM
|
---|
111 | */
|
---|
112 | extern int_t sio_rcv_chr(SIOPCB *siopcb);
|
---|
113 |
|
---|
114 | /*
|
---|
115 | * R[obNÌÂ
|
---|
116 | */
|
---|
117 | extern void sio_ena_cbr(SIOPCB *siopcb, uint_t cbrtn);
|
---|
118 |
|
---|
119 | /*
|
---|
120 | * R[obNÌÖ~
|
---|
121 | */
|
---|
122 | extern void sio_dis_cbr(SIOPCB *siopcb, uint_t cbrtn);
|
---|
123 |
|
---|
124 | /*
|
---|
125 | * MÂ\R[obN
|
---|
126 | */
|
---|
127 | extern void sio_irdy_snd(intptr_t exinf);
|
---|
128 |
|
---|
129 | /*
|
---|
130 | * óMÊmR[obN
|
---|
131 | */
|
---|
132 | extern void sio_irdy_rcv(intptr_t exinf);
|
---|
133 |
|
---|
134 | /*
|
---|
135 | * ^[QbgÌVAú»
|
---|
136 | */
|
---|
137 | extern void target_uart_init(ID siopid);
|
---|
138 |
|
---|
139 | /*
|
---|
140 | * 1¶oÍi|[OÅÌoÍj
|
---|
141 | */
|
---|
142 | extern void sio_pol_snd_chr(char_t c, ID siopid);
|
---|
143 |
|
---|
144 | #endif /* TOPPERS_MACRO_ONLY */
|
---|
145 | #endif /* TOPPERS_TARGET_SERIAL_H */
|
---|