|  | 
| 您好!tronlong提供的最新的linux3.3内核已经对uart0和uart1做了rs485功能的支持,uart2默认为启动串口。如何想使能uart0和uart1 rs485的功能,只需在menuconfig将485使能。; g* J; |# d& a: p4 X* e$ l *** DaVinci Core Type ***                                                              | |
 - r: i0 |; I4 v' {& H  | |                    [ ] DaVinci 644x based system                                                              | |
 8 L6 n, Z/ p* Q  | |                    [ ] DaVinci 355 based system                                                               | |6 g3 G# E$ m$ D( j: z6 ^( w; y/ y
 | |                    [ ] DaVinci 646x based system                                                              | |$ K& t1 i* p- U3 i' ?$ m
 | |                    [ ] DA830/OMAP-L137/AM17x based system                                                     | |
 $ H/ b3 B1 J- P5 b  | |                    [*] DA850/OMAP-L138/AM18x based system                                                     | |
 0 R2 ]" s3 Y# r  | |                    [ ]   Enable UART1 flow control                                                            | |0 p5 T& p% K2 u! p7 |7 F4 e
 | |                    [ ]   Enable UART0 RS485 funcation                                                         | |! y7 |7 b7 E% Z7 N
 | |                    [*]   Enable UART1 RS485 funcation 4 L& W8 B* Y0 S/ n( i1 K( v) ]( m
 4 ?/ R, f9 I3 B+ a0 J5 `7 g
 想了解详细的功能实现,也可以查看8250.c文件里面的;. B$ l' q# ^9 j7 l* @
 void serial8250_tx_chars(struct uart_8250_port *up)! r3 k1 w7 B9 \3 f# ~$ G6 `+ z$ f1 ?
 return;
 / q) C! Q  z. W$ \3 A! Q/ H        }
 2 N9 l$ Q8 o6 B. B, X/ A7 Z& {9 }% f. s0 }# V# k
 +#if 1, I0 o1 H3 W! j+ i
 +       /* The funcation with RS485 flow control */
 8 g# W# A& J# R+       if (up->port.private_data) {* f4 E' x0 l7 ]4 Z5 X
 +               struct serial8250_flow_ctrl *flow_ctrl_p;1 [: O9 A4 |' n+ ^
 +               flow_ctrl_p = up->port.private_data;
 * j- }# C3 c$ q- S* I* _+3 f. n; @) {+ h% ~9 H% u1 W& Y
 +               if (flow_ctrl_p->gpio) {/ V5 l. D0 S' t) c
 +                       gpio_set_value(flow_ctrl_p->gpio, 1);7 O0 g5 c) n, N7 v$ `9 B% o* G0 [0 a
 +                       ndelay(50); /* Propagation delay >= 50ns */( `5 Q: y/ \6 h* Q: K
 +               }
 . l+ j# C; e: F) o# `+       }
 1 @; k5 B' I/ g% l+#endif$ m4 H# Y+ h  [1 u) r' V4 B; B& }) M
 希望对您有帮助。7 s3 J- ~; v  r; o, x! D
 
 | 
 |