gnokii-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnokii/common/links atbus.c, 1.37, 1.38 fbus.c, 1.55, 1.56 m2bus.c, 1.18


From: BORBELY Zoltan <address@hidden>
Subject: gnokii/common/links atbus.c, 1.37, 1.38 fbus.c, 1.55, 1.56 m2bus.c, 1.18, 1.19
Date: Tue, 28 Oct 2003 00:03:42 +0000

Update of /cvsroot/gnokii/gnokii/common/links
In directory subversions:/tmp/cvs-serv17571/common/links

Modified Files:
        atbus.c fbus.c m2bus.c 
Log Message:
tcp device support added to phone drivers


Index: m2bus.c
===================================================================
RCS file: /cvsroot/gnokii/gnokii/common/links/m2bus.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** m2bus.c     15 Oct 2003 00:08:44 -0000      1.18
--- m2bus.c     28 Oct 2003 00:03:40 -0000      1.19
***************
*** 62,67 ****
  static bool m2bus_serial_open(struct gn_statemachine *state)
  {
        /* Open device. */
!       if (!device_open(state->config.port_device, true, false, false, 
GN_CT_Serial, state)) {
                perror(_("Couldn't open M2BUS device"));
                return false;
--- 62,74 ----
  static bool m2bus_serial_open(struct gn_statemachine *state)
  {
+       int type;
+ 
+       if (state->config.connection_type == GN_CT_TCP)
+               type = GN_CT_TCP;
+       else
+               type = GN_CT_Serial;
+ 
        /* Open device. */
!       if (!device_open(state->config.port_device, true, false, false, type, 
state)) {
                perror(_("Couldn't open M2BUS device"));
                return false;

Index: fbus.c
===================================================================
RCS file: /cvsroot/gnokii/gnokii/common/links/fbus.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** fbus.c      12 May 2003 15:02:51 -0000      1.55
--- fbus.c      28 Oct 2003 00:03:40 -0000      1.56
***************
*** 64,70 ****
  static bool fbus_serial_open(bool dlr3, struct gn_statemachine *state)
  {
        if (dlr3) dlr3 = 1;
        /* Open device. */
!       if (!device_open(state->config.port_device, false, false, false, 
GN_CT_Serial, state)) {
                perror(_("Couldn't open FBUS device"));
                return false;
--- 64,77 ----
  static bool fbus_serial_open(bool dlr3, struct gn_statemachine *state)
  {
+       int type;
+ 
+       if (state->config.connection_type == GN_CT_TCP)
+               type = GN_CT_TCP;
+       else
+               type = GN_CT_Serial;
+ 
        if (dlr3) dlr3 = 1;
        /* Open device. */
!       if (!device_open(state->config.port_device, false, false, false, type, 
state)) {
                perror(_("Couldn't open FBUS device"));
                return false;
***************
*** 108,112 ****
        device_changespeed(115200, state);
  
!       if (type != GN_CT_Bluetooth) { 
                for (count = 0; count < 32; count++) {
                        device_write(&init_char, 1, state);
--- 115,119 ----
        device_changespeed(115200, state);
  
!       if (type != GN_CT_Bluetooth && type != GN_CT_TCP) { 
                for (count = 0; count < 32; count++) {
                        device_write(&init_char, 1, state);
***************
*** 555,558 ****
--- 562,566 ----
                break;
        case GN_CT_Serial:
+       case GN_CT_TCP:
                switch (attempt) {
                case 0:
***************
*** 561,565 ****
                        break;
                case 2:
!                       connection = at2fbus_serial_open(state, GN_CT_Serial);
                        break;
                default:
--- 569,573 ----
                        break;
                case 2:
!                       connection = at2fbus_serial_open(state, 
state->config.connection_type);
                        break;
                default:
***************
*** 600,604 ****
        /* I believe that we need/can do this for any phone to get the UART 
synced */
  
!       if (state->config.connection_type != GN_CT_Bluetooth) {
                for (count = 0; count < state->config.init_length; count++) {
                        usleep(100);
--- 608,612 ----
        /* I believe that we need/can do this for any phone to get the UART 
synced */
  
!       if (state->config.connection_type != GN_CT_Bluetooth && 
state->config.connection_type != GN_CT_TCP) {
                for (count = 0; count < state->config.init_length; count++) {
                        usleep(100);

Index: atbus.c
===================================================================
RCS file: /cvsroot/gnokii/gnokii/common/links/atbus.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** atbus.c     28 Apr 2003 12:59:15 -0000      1.37
--- atbus.c     28 Oct 2003 00:03:40 -0000      1.38
***************
*** 224,227 ****
--- 224,228 ----
        case GN_CT_Serial:
        case GN_CT_Irda:
+       case GN_CT_TCP:
                if (!atbus_serial_open(mode, state->config.port_device, state)) 
{
                        error = GN_ERR_FAILED;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]