OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [ref/] [io-serial-driver-details.html] - Blame information for rev 565

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 28 unneback
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
2
<!-- This material may be distributed only subject to the terms      -->
3
<!-- and conditions set forth in the Open Publication License, v1.0  -->
4
<!-- or later (the latest version is presently available at          -->
5
<!-- http://www.opencontent.org/openpub/).                           -->
6
<!-- Distribution of the work or derivative of the work in any       -->
7
<!-- standard (paper) book form is prohibited unless prior           -->
8
<!-- permission is obtained from the copyright holder.               -->
9
<HTML
10
><HEAD
11
><TITLE
12
>Serial driver details</TITLE
13
><meta name="MSSmartTagsPreventParsing" content="TRUE">
14
<META
15
NAME="GENERATOR"
16
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17
"><LINK
18
REL="HOME"
19
TITLE="eCos Reference Manual"
20
HREF="ecos-ref.html"><LINK
21
REL="UP"
22
TITLE="I/O Package (Device Drivers)"
23
HREF="io.html"><LINK
24
REL="PREVIOUS"
25
TITLE="User API"
26
HREF="io-user-api.html"><LINK
27
REL="NEXT"
28
TITLE=" TTY driver"
29
HREF="io-tty-driver.html"></HEAD
30
><BODY
31
CLASS="CHAPTER"
32
BGCOLOR="#FFFFFF"
33
TEXT="#000000"
34
LINK="#0000FF"
35
VLINK="#840084"
36
ALINK="#0000FF"
37
><DIV
38
CLASS="NAVHEADER"
39
><TABLE
40
SUMMARY="Header navigation table"
41
WIDTH="100%"
42
BORDER="0"
43
CELLPADDING="0"
44
CELLSPACING="0"
45
><TR
46
><TH
47
COLSPAN="3"
48
ALIGN="center"
49
>eCos Reference Manual</TH
50
></TR
51
><TR
52
><TD
53
WIDTH="10%"
54
ALIGN="left"
55
VALIGN="bottom"
56
><A
57
HREF="io-user-api.html"
58
ACCESSKEY="P"
59
>Prev</A
60
></TD
61
><TD
62
WIDTH="80%"
63
ALIGN="center"
64
VALIGN="bottom"
65
></TD
66
><TD
67
WIDTH="10%"
68
ALIGN="right"
69
VALIGN="bottom"
70
><A
71
HREF="io-tty-driver.html"
72
ACCESSKEY="N"
73
>Next</A
74
></TD
75
></TR
76
></TABLE
77
><HR
78
ALIGN="LEFT"
79
WIDTH="100%"></DIV
80
><DIV
81
CLASS="CHAPTER"
82
><H1
83
><A
84
NAME="IO-SERIAL-DRIVER-DETAILS">Chapter 16. Serial driver details</H1
85
><DIV
86
CLASS="TOC"
87
><DL
88
><DT
89
><B
90
>Table of Contents</B
91
></DT
92
><DT
93
><A
94
HREF="io-serial-driver-details.html#IO-SIMPLE-SERIAL-DRIVER"
95
>Raw Serial Driver</A
96
></DT
97
><DT
98
><A
99
HREF="io-tty-driver.html"
100
>TTY driver</A
101
></DT
102
></DL
103
></DIV
104
><P
105
>Two different classes of serial drivers are provided as a standard
106
part of the eCos system. These are described as &#8220;raw
107
serial&#8221; (serial) and &#8220;tty-like&#8221; (tty).</P
108
><DIV
109
CLASS="SECTION"
110
><H1
111
CLASS="SECTION"
112
><A
113
NAME="IO-SIMPLE-SERIAL-DRIVER">Raw Serial Driver</H1
114
><P
115
>Use the include file <TT
116
CLASS="FILENAME"
117
>&lt;cyg/io/serialio.h&gt;</TT
118
> for
119
this driver.</P
120
><P
121
>The raw serial driver is capable of sending
122
and receiving blocks of raw data to a serial device. Controls are
123
provided to configure the actual hardware, but there is no manipulation
124
of the data by this driver.</P
125
><P
126
>There may be many instances of this driver in a given system,
127
one for each serial channel. Each channel corresponds to a physical
128
device and there will typically be a device module created for this
129
purpose. The device modules themselves are configurable, allowing
130
specification of the actual hardware details, as well as such details
131
as whether the channel should be buffered by the serial driver,
132
etc.</P
133
><DIV
134
CLASS="SECTION"
135
><H2
136
CLASS="SECTION"
137
><A
138
NAME="AEN10475">Runtime Configuration</H2
139
><P
140
>Runtime configuration is achieved by exchanging data structures with
141
the driver via the <TT
142
CLASS="FUNCTION"
143
>cyg_io_set_config()</TT
144
> and
145
<TT
146
CLASS="FUNCTION"
147
>cyg_io_get_config()</TT
148
> functions.</P
149
><TABLE
150
BORDER="5"
151
BGCOLOR="#E0E0F0"
152
WIDTH="70%"
153
><TR
154
><TD
155
><PRE
156
CLASS="PROGRAMLISTING"
157
>typedef struct {
158
 cyg_serial_baud_rate_t baud;
159
 cyg_serial_stop_bits_t stop;
160
 cyg_serial_parity_t parity;
161
 cyg_serial_word_length_t word_length;
162
 cyg_uint32 flags;
163
} cyg_serial_info_t;</PRE
164
></TD
165
></TR
166
></TABLE
167
><P
168
>The field <TT
169
CLASS="STRUCTFIELD"
170
><I
171
>word_length</I
172
></TT
173
> contains the number of data bits per word
174
(character). This must be one of the values:</P
175
><TABLE
176
BORDER="5"
177
BGCOLOR="#E0E0F0"
178
WIDTH="70%"
179
><TR
180
><TD
181
><PRE
182
CLASS="PROGRAMLISTING"
183
> CYGNUM_SERIAL_WORD_LENGTH_5
184
 CYGNUM_SERIAL_WORD_LENGTH_6
185
 CYGNUM_SERIAL_WORD_LENGTH_7
186
 CYGNUM_SERIAL_WORD_LENGTH_8</PRE
187
></TD
188
></TR
189
></TABLE
190
><P
191
>The field <TT
192
CLASS="STRUCTFIELD"
193
><I
194
>baud</I
195
></TT
196
> contains a baud rate selection.  This must be
197
one of the values:</P
198
><TABLE
199
BORDER="5"
200
BGCOLOR="#E0E0F0"
201
WIDTH="70%"
202
><TR
203
><TD
204
><PRE
205
CLASS="PROGRAMLISTING"
206
> CYGNUM_SERIAL_BAUD_50
207
 CYGNUM_SERIAL_BAUD_75
208
 CYGNUM_SERIAL_BAUD_110
209
 CYGNUM_SERIAL_BAUD_134_5
210
 CYGNUM_SERIAL_BAUD_150
211
 CYGNUM_SERIAL_BAUD_200
212
 CYGNUM_SERIAL_BAUD_300
213
 CYGNUM_SERIAL_BAUD_600
214
 CYGNUM_SERIAL_BAUD_1200
215
 CYGNUM_SERIAL_BAUD_1800
216
 CYGNUM_SERIAL_BAUD_2400
217
 CYGNUM_SERIAL_BAUD_3600
218
 CYGNUM_SERIAL_BAUD_4800
219
 CYGNUM_SERIAL_BAUD_7200
220
 CYGNUM_SERIAL_BAUD_9600
221
 CYGNUM_SERIAL_BAUD_14400
222
 CYGNUM_SERIAL_BAUD_19200
223
 CYGNUM_SERIAL_BAUD_38400
224
 CYGNUM_SERIAL_BAUD_57600
225
 CYGNUM_SERIAL_BAUD_115200
226
 CYGNUM_SERIAL_BAUD_234000</PRE
227
></TD
228
></TR
229
></TABLE
230
><P
231
>The field <TT
232
CLASS="STRUCTFIELD"
233
><I
234
>stop</I
235
></TT
236
> contains the number of stop bits. This must be
237
one of the values:</P
238
><TABLE
239
BORDER="5"
240
BGCOLOR="#E0E0F0"
241
WIDTH="70%"
242
><TR
243
><TD
244
><PRE
245
CLASS="PROGRAMLISTING"
246
> CYGNUM_SERIAL_STOP_1
247
 CYGNUM_SERIAL_STOP_1_5
248
 CYGNUM_SERIAL_STOP_2</PRE
249
></TD
250
></TR
251
></TABLE
252
><DIV
253
CLASS="NOTE"
254
><BLOCKQUOTE
255
CLASS="NOTE"
256
><P
257
><B
258
>Note: </B
259
>On most hardware, a selection of 1.5 stop bits is only valid
260
if the word (character) length is 5.</P
261
></BLOCKQUOTE
262
></DIV
263
><P
264
>The field <TT
265
CLASS="STRUCTFIELD"
266
><I
267
>parity</I
268
></TT
269
> contains the parity mode.  This must be one of
270
the values: </P
271
><TABLE
272
BORDER="5"
273
BGCOLOR="#E0E0F0"
274
WIDTH="70%"
275
><TR
276
><TD
277
><PRE
278
CLASS="PROGRAMLISTING"
279
> CYGNUM_SERIAL_PARITY_NONE
280
 CYGNUM_SERIAL_PARITY_EVEN
281
 CYGNUM_SERIAL_PARITY_ODD
282
 CYGNUM_SERIAL_PARITY_MARK
283
 CYGNUM_SERIAL_PARITY_SPACE</PRE
284
></TD
285
></TR
286
></TABLE
287
><P
288
>The field <TT
289
CLASS="STRUCTFIELD"
290
><I
291
>flags</I
292
></TT
293
> is a bitmask which controls the behavior of the
294
serial device driver. It should be built from the values
295
<TT
296
CLASS="LITERAL"
297
>CYG_SERIAL_FLAGS_xxx</TT
298
> defined below:</P
299
><TABLE
300
BORDER="5"
301
BGCOLOR="#E0E0F0"
302
WIDTH="70%"
303
><TR
304
><TD
305
><PRE
306
CLASS="PROGRAMLISTING"
307
>#define CYG_SERIAL_FLAGS_RTSCTS 0x0001</PRE
308
></TD
309
></TR
310
></TABLE
311
><P
312
>If this bit is set then the port is placed in &#8220;hardware
313
handshake&#8221; mode. In this mode, the CTS and RTS pins control
314
when data is allowed to be sent/received at the port. This
315
bit is ignored if the hardware does not support this level of
316
handshake.</P
317
><TABLE
318
BORDER="5"
319
BGCOLOR="#E0E0F0"
320
WIDTH="70%"
321
><TR
322
><TD
323
><PRE
324
CLASS="PROGRAMLISTING"
325
>typedef struct {
326
  cyg_int32 rx_bufsize;
327
  cyg_int32 rx_count;
328
  cyg_int32 tx_bufsize;
329
  cyg_int32 tx_count;
330
} cyg_serial_buf_info_t;     </PRE
331
></TD
332
></TR
333
></TABLE
334
><P
335
>The field <TT
336
CLASS="STRUCTFIELD"
337
><I
338
>rx_bufsize</I
339
></TT
340
> contains
341
the total size of the incoming data buffer. This is set to zero on
342
devices that do not support buffering (i.e. polled devices).</P
343
><P
344
>The field <TT
345
CLASS="STRUCTFIELD"
346
><I
347
>rx_count</I
348
></TT
349
> contains the
350
number of bytes currently occupied in the incoming data buffer.
351
This is set to zero on devices that do not support buffering (i.e. polled
352
devices).</P
353
><P
354
>The field <TT
355
CLASS="STRUCTFIELD"
356
><I
357
>tx_bufsize</I
358
></TT
359
> contains the
360
total size of the transmit data buffer. This is set to zero on devices
361
that do not support buffering (i.e. polled devices).</P
362
><P
363
>The field <TT
364
CLASS="STRUCTFIELD"
365
><I
366
>tx_count</I
367
></TT
368
> contains the
369
number of bytes currently occupied in the transmit data buffer.  This
370
is set to zero on devices that do not support buffering (i.e. polled
371
devices).</P
372
></DIV
373
><DIV
374
CLASS="SECTION"
375
><H2
376
CLASS="SECTION"
377
><A
378
NAME="AEN10510">API Details</H2
379
><DIV
380
CLASS="SECTION"
381
><H3
382
CLASS="SECTION"
383
><A
384
NAME="IO-SERIAL-CYG-IO-WRITE">cyg_io_write</H3
385
><TABLE
386
BORDER="5"
387
BGCOLOR="#E0E0F0"
388
WIDTH="70%"
389
><TR
390
><TD
391
><PRE
392
CLASS="PROGRAMLISTING"
393
>cyg_io_write(handle, buf, len)</PRE
394
></TD
395
></TR
396
></TABLE
397
><P
398
>Send the data from <TT
399
CLASS="PARAMETER"
400
><I
401
>buf</I
402
></TT
403
> to the device. The
404
driver maintains a buffer to hold the data. The size of the
405
intermediate buffer is configurable within the interface module. The
406
data is not modified at all while it is being buffered. On return,
407
<TT
408
CLASS="PARAMETER"
409
><I
410
>*len</I
411
></TT
412
> contains the amount of characters actually
413
consumed .</P
414
><P
415
>It is possible to configure the write call to be blocking
416
(default) or non-blocking. Non-blocking mode requires both the configuration
417
option <TT
418
CLASS="LITERAL"
419
>CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING</TT
420
>
421
to be enabled, and the specific device to be set to non-blocking
422
mode for writes (see <TT
423
CLASS="FUNCTION"
424
>cyg_io_set_config()</TT
425
>).</P
426
><P
427
>In blocking mode, the call will not return until there is space in the
428
buffer and the entire contents of <TT
429
CLASS="PARAMETER"
430
><I
431
>buf</I
432
></TT
433
> have been
434
consumed.</P
435
><P
436
>In non-blocking mode, as much as possible gets consumed from
437
<TT
438
CLASS="PARAMETER"
439
><I
440
>buf</I
441
></TT
442
>. If everything was consumed, the call
443
returns <TT
444
CLASS="LITERAL"
445
>ENOERR</TT
446
>. If only part of the
447
<TT
448
CLASS="PARAMETER"
449
><I
450
>buf</I
451
></TT
452
> contents was consumed,
453
<TT
454
CLASS="LITERAL"
455
>-EAGAIN</TT
456
> is returned and the caller must try
457
again. On return, <TT
458
CLASS="PARAMETER"
459
><I
460
>*len</I
461
></TT
462
> contains the number of characters actually
463
consumed .</P
464
><P
465
>The call can also return <TT
466
CLASS="LITERAL"
467
>-EINTR</TT
468
> if interrupted
469
via the <TT
470
CLASS="FUNCTION"
471
>cyg_io_get_config()</TT
472
>/<TT
473
CLASS="LITERAL"
474
>ABORT</TT
475
> key.</P
476
></DIV
477
><DIV
478
CLASS="SECTION"
479
><H3
480
CLASS="SECTION"
481
><A
482
NAME="IO-SERIAL-CYG-IO-READ">cyg_io_read</H3
483
><TABLE
484
BORDER="5"
485
BGCOLOR="#E0E0F0"
486
WIDTH="70%"
487
><TR
488
><TD
489
><PRE
490
CLASS="PROGRAMLISTING"
491
>cyg_io_read(handle, buf, len)</PRE
492
></TD
493
></TR
494
></TABLE
495
><P
496
>Receive data into the buffer, <TT
497
CLASS="PARAMETER"
498
><I
499
>buf</I
500
></TT
501
>, from the
502
device. No manipulation of the data is performed before being
503
transferred.  An interrupt driven interface module will support data
504
arriving when no read is pending by buffering the data in the serial
505
driver.  Again, this buffering is completely configurable. On return,
506
<TT
507
CLASS="PARAMETER"
508
><I
509
>*len</I
510
></TT
511
> contains the number of characters actually
512
received.</P
513
><P
514
>It is possible to configure the read call to be blocking (default)
515
or  non-blocking. Non-blocking mode requires both the configuration
516
option  <TT
517
CLASS="LITERAL"
518
>CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING</TT
519
>
520
to be enabled, and the specific device to be set to non-blocking
521
mode for reads (see <TT
522
CLASS="FUNCTION"
523
>cyg_io_set_config()</TT
524
>).</P
525
><P
526
>In blocking mode, the call will not return until the requested
527
amount of data has been read.</P
528
><P
529
>In non-blocking mode, data waiting in the device buffer is copied to
530
<TT
531
CLASS="PARAMETER"
532
><I
533
>buf</I
534
></TT
535
>, and the call returns immediately. If there
536
was enough data in the buffer to fulfill the request,
537
<TT
538
CLASS="LITERAL"
539
>ENOERR</TT
540
> is returned.  If only part of the request
541
could be fulfilled, <TT
542
CLASS="LITERAL"
543
>-EAGAIN</TT
544
> is returned and the
545
caller must try again. On return, <TT
546
CLASS="PARAMETER"
547
><I
548
>*len</I
549
></TT
550
> contains
551
the number of characters actually received.</P
552
><P
553
>The call can also return <TT
554
CLASS="LITERAL"
555
>-EINTR</TT
556
> if interrupted via
557
the <TT
558
CLASS="FUNCTION"
559
>cyg_io_get_config()</TT
560
>/<TT
561
CLASS="LITERAL"
562
>ABORT</TT
563
>
564
key.</P
565
></DIV
566
><DIV
567
CLASS="SECTION"
568
><H3
569
CLASS="SECTION"
570
><A
571
NAME="IO-SERIAL-CYG-GET-CONFIG">cyg_io_get_config</H3
572
><TABLE
573
BORDER="5"
574
BGCOLOR="#E0E0F0"
575
WIDTH="70%"
576
><TR
577
><TD
578
><PRE
579
CLASS="PROGRAMLISTING"
580
>cyg_io_get_config(handle, key, buf, len)</PRE
581
></TD
582
></TR
583
></TABLE
584
><P
585
>This function returns current [runtime] information
586
about the device and/or driver. </P
587
><P
588
></P
589
><DIV
590
CLASS="VARIABLELIST"
591
><DL
592
><DT
593
><TT
594
CLASS="LITERAL"
595
>CYG_IO_GET_CONFIG_SERIAL_INFO</TT
596
></DT
597
><DD
598
><P
599
></P
600
><DIV
601
CLASS="VARIABLELIST"
602
><DL
603
><DT
604
>Buf type:</DT
605
><DD
606
><P
607
>cyg_serial_info_t</P
608
></DD
609
><DT
610
>Function:</DT
611
><DD
612
><P
613
>              This function retrieves the current state of the driver
614
              and hardware. This information contains fields for
615
              hardware baud rate, number of stop bits, and parity
616
              mode. It also includes a set of flags that control the
617
              port, such as hardware flow control.
618
            </P
619
></DD
620
></DL
621
></DIV
622
></DD
623
><DT
624
><TT
625
CLASS="LITERAL"
626
>CYG_IO_GET_CONFIG_SERIAL_BUFFER_INFO</TT
627
></DT
628
><DD
629
><P
630
></P
631
><DIV
632
CLASS="VARIABLELIST"
633
><DL
634
><DT
635
>Buf type:</DT
636
><DD
637
><P
638
>cyg_serial_buf_info_t</P
639
></DD
640
><DT
641
>Function:</DT
642
><DD
643
><P
644
>               This function retrieves the current state of the
645
               software buffers in the serial drivers. For both
646
               receive and transmit buffers it returns the total
647
               buffer size and the current number of bytes occupied in
648
               the buffer. It does not take into account any buffering
649
               such as FIFOs or holding registers that the serial
650
               device itself may have.
651
             </P
652
></DD
653
></DL
654
></DIV
655
></DD
656
><DT
657
><TT
658
CLASS="LITERAL"
659
>CYG_IO_GET_CONFIG_SERIAL_OUTPUT_DRAIN</TT
660
></DT
661
><DD
662
><P
663
></P
664
><DIV
665
CLASS="VARIABLELIST"
666
><DL
667
><DT
668
>Buf type:</DT
669
><DD
670
><P
671
>void *</P
672
></DD
673
><DT
674
>Function:</DT
675
><DD
676
><P
677
>              This function waits for any buffered output to
678
              complete. This function only completes when there is no
679
              more data remaining to be sent to the device.
680
            </P
681
></DD
682
></DL
683
></DIV
684
></DD
685
><DT
686
><TT
687
CLASS="LITERAL"
688
>CYG_IO_GET_CONFIG_SERIAL_OUTPUT_FLUSH</TT
689
></DT
690
><DD
691
><P
692
></P
693
><DIV
694
CLASS="VARIABLELIST"
695
><DL
696
><DT
697
>Buf type:</DT
698
><DD
699
><P
700
>void *</P
701
></DD
702
><DT
703
>Function:</DT
704
><DD
705
><P
706
>              This function discards any buffered output for the
707
              device.
708
            </P
709
></DD
710
></DL
711
></DIV
712
></DD
713
><DT
714
><TT
715
CLASS="LITERAL"
716
>CYG_IO_GET_CONFIG_SERIAL_INPUT_DRAIN</TT
717
></DT
718
><DD
719
><P
720
></P
721
><DIV
722
CLASS="VARIABLELIST"
723
><DL
724
><DT
725
>Buf type:</DT
726
><DD
727
><P
728
>void *</P
729
></DD
730
><DT
731
>Function:</DT
732
><DD
733
><P
734
>This function discards any buffered input for the
735
            device.</P
736
></DD
737
></DL
738
></DIV
739
></DD
740
><DT
741
><TT
742
CLASS="LITERAL"
743
>CYG_IO_GET_CONFIG_SERIAL_ABORT</TT
744
></DT
745
><DD
746
><P
747
></P
748
><DIV
749
CLASS="VARIABLELIST"
750
><DL
751
><DT
752
>Buf type:</DT
753
><DD
754
><P
755
> void*</P
756
></DD
757
><DT
758
>Function:</DT
759
><DD
760
><P
761
>This function will cause any pending read or write calls on
762
            this device to return with <TT
763
CLASS="LITERAL"
764
>-EABORT</TT
765
>.</P
766
></DD
767
></DL
768
></DIV
769
></DD
770
><DT
771
><TT
772
CLASS="LITERAL"
773
>CYG_IO_GET_CONFIG_SERIAL_READ_BLOCKING</TT
774
></DT
775
><DD
776
><P
777
></P
778
><DIV
779
CLASS="VARIABLELIST"
780
><DL
781
><DT
782
>Buf type:</DT
783
><DD
784
><P
785
> cyg_uint32 (values 0 or 1)</P
786
></DD
787
><DT
788
>Function:</DT
789
><DD
790
><P
791
>This function will read back the blocking-mode
792
            setting for read calls on this device. This call is only
793
            available if the configuration option
794
            <TT
795
CLASS="LITERAL"
796
>CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING</TT
797
> is
798
            enabled.</P
799
></DD
800
></DL
801
></DIV
802
></DD
803
><DT
804
><TT
805
CLASS="LITERAL"
806
>CYG_IO_GET_CONFIG_SERIAL_WRITE_BLOCKING</TT
807
></DT
808
><DD
809
><P
810
></P
811
><DIV
812
CLASS="VARIABLELIST"
813
><DL
814
><DT
815
>Buf type:</DT
816
><DD
817
><P
818
> cyg_uint32 (values 0 or 1)</P
819
></DD
820
><DT
821
>Function:</DT
822
><DD
823
><P
824
>            This function will read back the blocking-mode
825
            setting for write calls on this device. This call is only
826
            available if the configuration option
827
            <TT
828
CLASS="LITERAL"
829
>CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING</TT
830
> is enabled.</P
831
></DD
832
></DL
833
></DIV
834
></DD
835
></DL
836
></DIV
837
></DIV
838
><DIV
839
CLASS="SECTION"
840
><H3
841
CLASS="SECTION"
842
><A
843
NAME="IO-SERIAL-CYG-SET-CONFIG">cyg_io_set_config</H3
844
><TABLE
845
BORDER="5"
846
BGCOLOR="#E0E0F0"
847
WIDTH="70%"
848
><TR
849
><TD
850
><PRE
851
CLASS="PROGRAMLISTING"
852
>cyg_io_set_config(handle, key, buf,len)</PRE
853
></TD
854
></TR
855
></TABLE
856
><P
857
>This function is used to update or change runtime configuration
858
of a port. </P
859
><P
860
></P
861
><DIV
862
CLASS="VARIABLELIST"
863
><DL
864
><DT
865
><TT
866
CLASS="LITERAL"
867
>CYG_IO_SET_CONFIG_SERIAL_INFO</TT
868
></DT
869
><DD
870
><P
871
></P
872
><DIV
873
CLASS="VARIABLELIST"
874
><DL
875
><DT
876
>Buf type:</DT
877
><DD
878
><P
879
>cyg_serial_info_t</P
880
></DD
881
><DT
882
>Function:</DT
883
><DD
884
><P
885
>This function updates the information for the driver
886
            and hardware.  The information contains fields for
887
            hardware baud rate, number of stop bits, and parity
888
            mode. It also includes a set of flags that control the
889
            port, such as hardware flow control.
890
            </P
891
></DD
892
></DL
893
></DIV
894
></DD
895
><DT
896
><TT
897
CLASS="LITERAL"
898
>CYG_IO_SET_CONFIG_SERIAL_READ_BLOCKING</TT
899
></DT
900
><DD
901
><P
902
></P
903
><DIV
904
CLASS="VARIABLELIST"
905
><DL
906
><DT
907
>Buf type:</DT
908
><DD
909
><P
910
> cyg_uint32 (values 0 or 1)</P
911
></DD
912
><DT
913
>Function:</DT
914
><DD
915
><P
916
>This function will set the blocking-mode for read
917
            calls on this device. This call is only available if the
918
            configuration option <TT
919
CLASS="LITERAL"
920
>CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING</TT
921
>
922
            is enabled.
923
            </P
924
></DD
925
></DL
926
></DIV
927
></DD
928
><DT
929
><TT
930
CLASS="LITERAL"
931
>CYG_IO_SET_CONFIG_SERIAL_WRITE_BLOCKING</TT
932
></DT
933
><DD
934
><P
935
></P
936
><DIV
937
CLASS="VARIABLELIST"
938
><DL
939
><DT
940
>Buf type:</DT
941
><DD
942
><P
943
>cyg_uint32 (values 0 or 1)</P
944
></DD
945
><DT
946
>Function:</DT
947
><DD
948
><P
949
>This function will set the blocking-mode for write
950
            calls on this device. This call is only available if the
951
            configuration option <TT
952
CLASS="LITERAL"
953
>CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING</TT
954
>
955
            is enabled.
956
            </P
957
></DD
958
></DL
959
></DIV
960
></DD
961
></DL
962
></DIV
963
></DIV
964
></DIV
965
></DIV
966
></DIV
967
><DIV
968
CLASS="NAVFOOTER"
969
><HR
970
ALIGN="LEFT"
971
WIDTH="100%"><TABLE
972
SUMMARY="Footer navigation table"
973
WIDTH="100%"
974
BORDER="0"
975
CELLPADDING="0"
976
CELLSPACING="0"
977
><TR
978
><TD
979
WIDTH="33%"
980
ALIGN="left"
981
VALIGN="top"
982
><A
983
HREF="io-user-api.html"
984
ACCESSKEY="P"
985
>Prev</A
986
></TD
987
><TD
988
WIDTH="34%"
989
ALIGN="center"
990
VALIGN="top"
991
><A
992
HREF="ecos-ref.html"
993
ACCESSKEY="H"
994
>Home</A
995
></TD
996
><TD
997
WIDTH="33%"
998
ALIGN="right"
999
VALIGN="top"
1000
><A
1001
HREF="io-tty-driver.html"
1002
ACCESSKEY="N"
1003
>Next</A
1004
></TD
1005
></TR
1006
><TR
1007
><TD
1008
WIDTH="33%"
1009
ALIGN="left"
1010
VALIGN="top"
1011
>User API</TD
1012
><TD
1013
WIDTH="34%"
1014
ALIGN="center"
1015
VALIGN="top"
1016
><A
1017
HREF="io.html"
1018
ACCESSKEY="U"
1019
>Up</A
1020
></TD
1021
><TD
1022
WIDTH="33%"
1023
ALIGN="right"
1024
VALIGN="top"
1025
>TTY driver</TD
1026
></TR
1027
></TABLE
1028
></DIV
1029
></BODY
1030
></HTML
1031
>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.