1 | /*
|
---|
2 | * TOPPERS/ASP Kernel
|
---|
3 | * Toyohashi Open Platform for Embedded Real-Time Systems/
|
---|
4 | * Advanced Standard Profile Kernel
|
---|
5 | *
|
---|
6 | * Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
|
---|
7 | * Toyohashi Univ. of Technology, JAPAN
|
---|
8 | * Copyright (C) 2004-2011 by Embedded and Real-Time Systems Laboratory
|
---|
9 | * Graduate School of Information Science, Nagoya Univ., JAPAN
|
---|
10 | *
|
---|
11 | * ãLì ÒÍCȺÌ(1)`(4)Ìðð½·êÉÀèC{\tgEF
|
---|
12 | * Ai{\tgEFAðüϵ½àÌðÜÞDȺ¯¶jðgpE¡»Eü
|
---|
13 | * ÏEÄzziȺCpÆÄÔj·é±Æð³Åø·éD
|
---|
14 | * (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
|
---|
15 | * \¦C±Ìpð¨æÑºLÌ³ÛØKèªC»ÌÜÜÌ`Å\[
|
---|
16 | * XR[hÉÜÜêĢ鱯D
|
---|
17 | * (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJÉg
|
---|
18 | * pÅ«é`ÅÄzz·éêÉÍCÄzzɺ¤hL
|
---|
19 | gip
|
---|
20 | * Ò}j
|
---|
21 | AÈÇjÉCãLÌì \¦C±Ìpð¨æÑºL
|
---|
22 | * Ì³ÛØKèðfÚ·é±ÆD
|
---|
23 | * (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJÉg
|
---|
24 | * pūȢ`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
|
---|
25 | * ÆD
|
---|
26 | * (a) Äzzɺ¤hL
|
---|
27 | gipÒ}j
|
---|
28 | AÈÇjÉCãLÌ
|
---|
29 | * ì \¦C±Ìpð¨æÑºLÌ³ÛØKèðfÚ·é±ÆD
|
---|
30 | * (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
|
---|
31 | * ñ·é±ÆD
|
---|
32 | * (4) {\tgEFAÌpÉæè¼ÚIܽÍÔÚIɶ¶é¢©Èé¹
|
---|
33 | * Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
|
---|
34 | * ܽC{\tgEFAÌ[UܽÍGh[U©çÌ¢©Èé
|
---|
35 | * RÉîÿ©çàCãLì Ò¨æÑTOPPERSvWFNgð
|
---|
36 | * ÆÓ·é±ÆD
|
---|
37 | *
|
---|
38 | * {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
|
---|
39 | * æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄCÁèÌgpÚI
|
---|
40 | * ÉηéK«àÜßÄC¢©ÈéÛØàsíÈ¢DܽC{\tgEF
|
---|
41 | * AÌpÉæè¼ÚIܽÍÔÚIɶ¶½¢©Èé¹QÉÖµÄàC»
|
---|
42 | * ÌÓCðíÈ¢D
|
---|
43 | *
|
---|
44 | * @(#) $Id: serial.h 164 2016-03-07 11:33:50Z coas-nagasima $
|
---|
45 | */
|
---|
46 |
|
---|
47 | /*
|
---|
48 | * VAC^tF[XhCo
|
---|
49 | */
|
---|
50 |
|
---|
51 | #ifndef TOPPERS_SERIAL_H
|
---|
52 | #define TOPPERS_SERIAL_H
|
---|
53 |
|
---|
54 | #ifdef __cplusplus
|
---|
55 | extern "C" {
|
---|
56 | #endif
|
---|
57 |
|
---|
58 | /*
|
---|
59 | * VAC^tF[XhCoÌp¢épPbg
|
---|
60 | */
|
---|
61 | typedef struct {
|
---|
62 | uint_t reacnt; /* óMobt@̶ */
|
---|
63 | uint_t wricnt; /* Mobt@̶ */
|
---|
64 | } T_SERIAL_RPOR;
|
---|
65 |
|
---|
66 | /*
|
---|
67 | * VAC^tF[XhCoÌú»[`
|
---|
68 | */
|
---|
69 | extern void serial_initialize(intptr_t exinf) throw();
|
---|
70 |
|
---|
71 | /*
|
---|
72 | * VAC^tF[XhCo©çÌ¢M¶Ìæoµ
|
---|
73 | */
|
---|
74 | extern bool_t serial_get_chr(ID portid, char *p_c) throw();
|
---|
75 |
|
---|
76 | /*
|
---|
77 | * VAC^tF[XhCoÌT[rXR[
|
---|
78 | */
|
---|
79 | extern ER serial_opn_por(ID portid) throw();
|
---|
80 | extern ER serial_cls_por(ID portid) throw();
|
---|
81 | extern ER_UINT serial_rea_dat(ID portid, char *buf, uint_t len) throw();
|
---|
82 | extern ER_UINT serial_wri_dat(ID portid, const char *buf, uint_t len) throw();
|
---|
83 | extern ER serial_ctl_por(ID portid, uint_t ioctl) throw();
|
---|
84 | extern ER serial_ref_por(ID portid, T_SERIAL_RPOR *pk_rpor) throw();
|
---|
85 |
|
---|
86 | /*
|
---|
87 | * VAC^tF[XhCoÌ®ì§äp̽ßÌè
|
---|
88 | *
|
---|
89 | * ȺÌèÍCrbgÉ_aðÆÁÄp¢éD
|
---|
90 | */
|
---|
91 | #define IOCTL_NULL 0U /* wèȵ */
|
---|
92 | #define IOCTL_ECHO 0x0001U /* óMµ½¶ðGR[obN */
|
---|
93 | #define IOCTL_CRLF 0x0010U /* LFðM·éOÉCRðtÁ */
|
---|
94 | #define IOCTL_FCSND 0x0100U /* MÉεÄt[§äðs¤ */
|
---|
95 | #define IOCTL_FCANY 0x0200U /* ÇÌæ¤È¶ÅàMÄJ */
|
---|
96 | #define IOCTL_FCRCV 0x0400U /* óMÉεÄt[§äðs¤ */
|
---|
97 |
|
---|
98 | #ifdef __cplusplus
|
---|
99 | }
|
---|
100 | #endif
|
---|
101 |
|
---|
102 | #endif /* TOPPERS_SERIAL_H */
|
---|