Skip to content

Commit 64fafce

Browse files
Merge pull request #4 from TimerOverflow/20161207
20161207
2 parents d74ea68 + 2b885f2 commit 64fafce

File tree

13 files changed

+473
-297
lines changed

13 files changed

+473
-297
lines changed

AvrUart.c

Lines changed: 238 additions & 46 deletions
Large diffs are not rendered by default.

AvrUart.h

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@
77
#ifndef __AVR_UART_H__
88
#define __AVR_UART_H__
99
/*********************************************************************************/
10-
#define AVR_UART_REVISION_DATE 20161117
10+
#define AVR_UART_REVISION_DATE 20161207
1111
/*********************************************************************************/
1212
/** REVISION HISTORY **/
1313
/*
14+
2016. 12. 07. - MoveBufPointer() 함수의 인수 'Dir' 삭제.
15+
Jung Hyun Gu - AvrUartGetData() 함수의 인수명 변경 'BufSize' -> 'Length'
16+
- AvrUartClearRx() 함수 삭제.
17+
- AvrUartClearQueueBuf() 함수 추가.
18+
- 주석 추가.
19+
1420
2016. 11. 17. - 'AVR_REGISTER' 타입 삭제 -> 'char *' 타입으로 변경.
1521
Jung Hyun Gu
1622
@@ -34,11 +40,7 @@
3440
/*********************************************************************************/
3541
/**Enum**/
3642

37-
typedef enum
38-
{
39-
AVR_UART_FORWARD = 0,
40-
AVR_UART_BACKWARD,
41-
}enum_AvrUartMoveDirection;
43+
4244
/*********************************************************************************/
4345
/**Struct**/
4446

@@ -95,11 +97,11 @@ int AvrUartCheckTx(tag_AvrUartCtrl *Com);
9597
int AvrUartCheckRx(tag_AvrUartCtrl *Com);
9698

9799
void AvrUartGetChar(tag_AvrUartCtrl *Com, char *Char);
98-
void AvrUartGetData(tag_AvrUartCtrl *Com, char *Buf, int BufSize);
100+
void AvrUartGetData(tag_AvrUartCtrl *Com, char *Buf, int Length);
99101

100102

101-
void AvrUartClearRx(tag_AvrUartCtrl *Com);
102-
char AvrUartViewRxBuf(tag_AvrUartCtrl *Com, int Move, enum_AvrUartMoveDirection Direction);
103+
void AvrUartClearQueueBuf(tag_AvrUartRingBuf *Queue);
104+
char AvrUartViewRxBuf(tag_AvrUartCtrl *Com, int Move);
103105
char AvrUartCheckReceiving(tag_AvrUartCtrl *Com);
104106

105107

example/AvrUart.dep

Lines changed: 77 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,28 @@
66
<configuration>
77
<name>Debug</name>
88
<outputs>
9-
<file>$TOOLKIT_DIR$\inc\ina90.h</file>
9+
<file>$PROJ_DIR$\Debug\Obj\AvrUart.pbd</file>
1010
<file>$PROJ_DIR$\..\AvrUart.c</file>
11-
<file>$PROJ_DIR$\Debug\Obj\main.r90</file>
12-
<file>$PROJ_DIR$\Debug\Obj\AvrUart.r90</file>
13-
<file>$PROJ_DIR$\Debug\Obj\AvrUart.pbi</file>
14-
<file>$TOOLKIT_DIR$\lib\clib\cl3s-ec_mul-sf.r90</file>
15-
<file>$TOOLKIT_DIR$\config\lnkm64s.xcl</file>
16-
<file>$TOOLKIT_DIR$\inc\iom64.h</file>
17-
<file>$PROJ_DIR$\Debug\Exe\AvrUart(AT64).d90</file>
18-
<file>$PROJ_DIR$\AvrUartBaud.h</file>
19-
<file>$PROJ_DIR$\..\SysTypedef.h</file>
20-
<file>$TOOLKIT_DIR$\inc\clib\string.h</file>
2111
<file>$PROJ_DIR$\main.c</file>
12+
<file>$PROJ_DIR$\Debug\Obj\AvrUart.pbi</file>
2213
<file>$PROJ_DIR$\Debug\Obj\AvrUartBaud.r90</file>
14+
<file>$TOOLKIT_DIR$\inc\clib\string.h</file>
15+
<file>$TOOLKIT_DIR$\inc\iom64.h</file>
2316
<file>$TOOLKIT_DIR$\inc\clib\sysmac.h</file>
24-
<file>$PROJ_DIR$\..\AvrUart.h</file>
25-
<file>$PROJ_DIR$\Debug\Obj\AvrUartBaud.pbi</file>
17+
<file>$PROJ_DIR$\Debug\Exe\AvrUart(AT64).d90</file>
2618
<file>$PROJ_DIR$\Debug\Obj\main.pbi</file>
19+
<file>$TOOLKIT_DIR$\inc\ina90.h</file>
20+
<file>$PROJ_DIR$\Debug\Obj\AvrUart.r90</file>
21+
<file>$TOOLKIT_DIR$\lib\clib\cl3s-ec_mul-sf.r90</file>
22+
<file>$TOOLKIT_DIR$\config\lnkm64s.xcl</file>
2723
<file>$TOOLKIT_DIR$\inc\iomacro.h</file>
28-
<file>$PROJ_DIR$\AvrUartBaud.c</file>
29-
<file>$PROJ_DIR$\Debug\Obj\AvrUart.pbd</file>
3024
<file>$TOOLKIT_DIR$\inc\bitdefinitions\iom64.inc</file>
25+
<file>$PROJ_DIR$\Debug\Obj\main.r90</file>
26+
<file>$PROJ_DIR$\..\AvrUart.h</file>
27+
<file>$PROJ_DIR$\..\SysTypedef.h</file>
28+
<file>$PROJ_DIR$\Debug\Obj\AvrUartBaud.pbi</file>
29+
<file>$PROJ_DIR$\AvrUartBaud.c</file>
30+
<file>$PROJ_DIR$\AvrUartBaud.h</file>
3131
<file>$TOOLKIT_DIR$\inc\comp_a90.h</file>
3232
<file>$TOOLKIT_DIR$\inc\intrinsics.h</file>
3333
<file>$TOOLKIT_DIR$\inc\inavr.h</file>
@@ -41,35 +41,35 @@
4141
</tool>
4242
</outputs>
4343
</file>
44+
<file>
45+
<name>$PROJ_DIR$\Debug\Obj\AvrUart.pbd</name>
46+
<inputs>
47+
<tool>
48+
<name>BILINK</name>
49+
<file> 3 19 9</file>
50+
</tool>
51+
</inputs>
52+
</file>
4453
<file>
4554
<name>$PROJ_DIR$\..\AvrUart.c</name>
4655
<outputs>
4756
<tool>
4857
<name>BICOMP</name>
49-
<file> 4</file>
58+
<file> 3</file>
5059
</tool>
5160
<tool>
5261
<name>ICCAVR</name>
53-
<file> 3</file>
62+
<file> 11</file>
5463
</tool>
5564
</outputs>
5665
<inputs>
5766
<tool>
5867
<name>BICOMP</name>
59-
<file> 11 14 15</file>
68+
<file> 5 7 17</file>
6069
</tool>
6170
<tool>
6271
<name>ICCAVR</name>
63-
<file> 11 14 15</file>
64-
</tool>
65-
</inputs>
66-
</file>
67-
<file>
68-
<name>$PROJ_DIR$\Debug\Exe\AvrUart(AT64).d90</name>
69-
<inputs>
70-
<tool>
71-
<name>XLINK</name>
72-
<file> 6 3 13 2 5</file>
72+
<file> 5 7 17</file>
7373
</tool>
7474
</inputs>
7575
</file>
@@ -78,21 +78,30 @@
7878
<outputs>
7979
<tool>
8080
<name>BICOMP</name>
81-
<file> 17</file>
81+
<file> 9</file>
8282
</tool>
8383
<tool>
8484
<name>ICCAVR</name>
85-
<file> 2</file>
85+
<file> 16</file>
8686
</tool>
8787
</outputs>
8888
<inputs>
8989
<tool>
9090
<name>BICOMP</name>
91-
<file> 7 18 21 0 24 23 22 11 14 15 9 10</file>
91+
<file> 6 14 15 10 24 23 22 5 7 17 21 18</file>
9292
</tool>
9393
<tool>
9494
<name>ICCAVR</name>
95-
<file> 7 18 21 0 24 23 22 11 14 15 9 10</file>
95+
<file> 6 14 15 10 24 23 22 5 7 17 21 18</file>
96+
</tool>
97+
</inputs>
98+
</file>
99+
<file>
100+
<name>$PROJ_DIR$\Debug\Exe\AvrUart(AT64).d90</name>
101+
<inputs>
102+
<tool>
103+
<name>XLINK</name>
104+
<file> 13 11 4 16 12</file>
96105
</tool>
97106
</inputs>
98107
</file>
@@ -101,30 +110,21 @@
101110
<outputs>
102111
<tool>
103112
<name>BICOMP</name>
104-
<file> 16</file>
113+
<file> 19</file>
105114
</tool>
106115
<tool>
107116
<name>ICCAVR</name>
108-
<file> 13</file>
117+
<file> 4</file>
109118
</tool>
110119
</outputs>
111120
<inputs>
112121
<tool>
113122
<name>BICOMP</name>
114-
<file> 9 10</file>
123+
<file> 21 18</file>
115124
</tool>
116125
<tool>
117126
<name>ICCAVR</name>
118-
<file> 9 10</file>
119-
</tool>
120-
</inputs>
121-
</file>
122-
<file>
123-
<name>$PROJ_DIR$\Debug\Obj\AvrUart.pbd</name>
124-
<inputs>
125-
<tool>
126-
<name>BILINK</name>
127-
<file> 4 16 17</file>
127+
<file> 21 18</file>
128128
</tool>
129129
</inputs>
130130
</file>
@@ -135,38 +135,38 @@
135135
<configuration>
136136
<name>Release</name>
137137
<outputs>
138-
<file>$TOOLKIT_DIR$\inc\ina90.h</file>
139138
<file>$PROJ_DIR$\..\AvrUart.c</file>
140-
<file>$TOOLKIT_DIR$\lib\clib\cl3s-ec_mul-sf.r90</file>
141-
<file>$TOOLKIT_DIR$\config\lnkm64s.xcl</file>
142-
<file>$TOOLKIT_DIR$\inc\iom64.h</file>
143-
<file>$PROJ_DIR$\AvrUartBaud.h</file>
144-
<file>$PROJ_DIR$\..\SysTypedef.h</file>
145-
<file>$TOOLKIT_DIR$\inc\clib\string.h</file>
146139
<file>$PROJ_DIR$\main.c</file>
140+
<file>$TOOLKIT_DIR$\inc\clib\string.h</file>
141+
<file>$TOOLKIT_DIR$\inc\iom64.h</file>
147142
<file>$TOOLKIT_DIR$\inc\clib\sysmac.h</file>
148-
<file>$PROJ_DIR$\..\AvrUart.h</file>
143+
<file>$TOOLKIT_DIR$\inc\ina90.h</file>
144+
<file>$TOOLKIT_DIR$\lib\clib\cl3s-ec_mul-sf.r90</file>
145+
<file>$TOOLKIT_DIR$\config\lnkm64s.xcl</file>
149146
<file>$TOOLKIT_DIR$\inc\iomacro.h</file>
150-
<file>$PROJ_DIR$\AvrUartBaud.c</file>
151147
<file>$TOOLKIT_DIR$\inc\bitdefinitions\iom64.inc</file>
152-
<file>$PROJ_DIR$\Release\Obj\AvrUart.pbd</file>
148+
<file>$PROJ_DIR$\..\AvrUart.h</file>
149+
<file>$PROJ_DIR$\..\SysTypedef.h</file>
150+
<file>$PROJ_DIR$\AvrUartBaud.c</file>
151+
<file>$PROJ_DIR$\AvrUartBaud.h</file>
153152
<file>$PROJ_DIR$\Release\Obj\main.pbi</file>
153+
<file>$PROJ_DIR$\Release\Obj\main.r90</file>
154+
<file>$PROJ_DIR$\Release\Exe\AvrUart(AT64).hex</file>
154155
<file>$TOOLKIT_DIR$\inc\comp_a90.h</file>
156+
<file>$PROJ_DIR$\Release\Obj\AvrUart.pbi</file>
157+
<file>$PROJ_DIR$\Release\Obj\AvrUart.pbd</file>
158+
<file>$TOOLKIT_DIR$\inc\intrinsics.h</file>
155159
<file>$PROJ_DIR$\Release\Obj\AvrUartBaud.r90</file>
156160
<file>$PROJ_DIR$\Release\Obj\AvrUartBaud.pbi</file>
157-
<file>$TOOLKIT_DIR$\inc\intrinsics.h</file>
158-
<file>$PROJ_DIR$\Release\Obj\AvrUart.pbi</file>
159-
<file>$PROJ_DIR$\Release\Obj\main.r90</file>
160161
<file>$TOOLKIT_DIR$\inc\inavr.h</file>
161162
<file>$PROJ_DIR$\Release\Obj\AvrUart.r90</file>
162-
<file>$PROJ_DIR$\Release\Exe\AvrUart(AT64).hex</file>
163163
</outputs>
164164
<file>
165165
<name>[ROOT_NODE]</name>
166166
<outputs>
167167
<tool>
168168
<name>XLINK</name>
169-
<file> 24</file>
169+
<file> 16</file>
170170
</tool>
171171
</outputs>
172172
</file>
@@ -175,21 +175,21 @@
175175
<outputs>
176176
<tool>
177177
<name>BICOMP</name>
178-
<file> 20</file>
178+
<file> 18</file>
179179
</tool>
180180
<tool>
181181
<name>ICCAVR</name>
182-
<file> 23</file>
182+
<file> 24</file>
183183
</tool>
184184
</outputs>
185185
<inputs>
186186
<tool>
187187
<name>BICOMP</name>
188-
<file> 7 9 10</file>
188+
<file> 2 4 10</file>
189189
</tool>
190190
<tool>
191191
<name>ICCAVR</name>
192-
<file> 7 9 10</file>
192+
<file> 2 4 10</file>
193193
</tool>
194194
</inputs>
195195
</file>
@@ -198,21 +198,21 @@
198198
<outputs>
199199
<tool>
200200
<name>BICOMP</name>
201-
<file> 15</file>
201+
<file> 14</file>
202202
</tool>
203203
<tool>
204204
<name>ICCAVR</name>
205-
<file> 21</file>
205+
<file> 15</file>
206206
</tool>
207207
</outputs>
208208
<inputs>
209209
<tool>
210210
<name>BICOMP</name>
211-
<file> 4 11 13 0 22 19 16 7 9 10 5 6</file>
211+
<file> 3 8 9 5 23 20 17 2 4 10 13 11</file>
212212
</tool>
213213
<tool>
214214
<name>ICCAVR</name>
215-
<file> 4 11 13 0 22 19 16 7 9 10 5 6</file>
215+
<file> 3 8 9 5 23 20 17 2 4 10 13 11</file>
216216
</tool>
217217
</inputs>
218218
</file>
@@ -221,39 +221,35 @@
221221
<outputs>
222222
<tool>
223223
<name>BICOMP</name>
224-
<file> 18</file>
224+
<file> 22</file>
225225
</tool>
226226
<tool>
227227
<name>ICCAVR</name>
228-
<file> 17</file>
228+
<file> 21</file>
229229
</tool>
230230
</outputs>
231231
<inputs>
232-
<tool>
233-
<name>BICOMP</name>
234-
<file> 5 6</file>
235-
</tool>
236232
<tool>
237233
<name>ICCAVR</name>
238-
<file> 5 6</file>
234+
<file> 13 11</file>
239235
</tool>
240236
</inputs>
241237
</file>
242238
<file>
243-
<name>$PROJ_DIR$\Release\Obj\AvrUart.pbd</name>
239+
<name>$PROJ_DIR$\Release\Exe\AvrUart(AT64).hex</name>
244240
<inputs>
245241
<tool>
246-
<name>BILINK</name>
247-
<file> 20 18 15</file>
242+
<name>XLINK</name>
243+
<file> 7 24 21 15 6</file>
248244
</tool>
249245
</inputs>
250246
</file>
251247
<file>
252-
<name>$PROJ_DIR$\Release\Exe\AvrUart(AT64).hex</name>
248+
<name>$PROJ_DIR$\Release\Obj\AvrUart.pbd</name>
253249
<inputs>
254250
<tool>
255-
<name>XLINK</name>
256-
<file> 3 23 17 21 2</file>
251+
<name>BILINK</name>
252+
<file> 18 22 14</file>
257253
</tool>
258254
</inputs>
259255
</file>
-462 Bytes
Binary file not shown.

example/Debug/Obj/AvrUart.pbd

Lines changed: 0 additions & 5 deletions
This file was deleted.

example/Debug/Obj/AvrUart.r90

-1.21 KB
Binary file not shown.

example/Debug/Obj/main.r90

48 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)