X-Git-Url: http://git.jankratochvil.net/?p=gnokii.git;a=blobdiff_plain;f=common%2Fdevices%2Ftekram.c;h=413581c576ae1f09c6e4b02a19ea4e37abac28a2;hp=5da6097c2f39fd96a105836897ee4bb4e07be668;hb=49dd905279a8e62936e3713510ab0fd738e20ecb;hpb=2f2703c9133032c12671ca5c77ae626b8fb178d4 diff --git a/common/devices/tekram.c b/common/devices/tekram.c index 5da6097..413581c 100644 --- a/common/devices/tekram.c +++ b/common/devices/tekram.c @@ -6,6 +6,9 @@ * * A Linux/Unix toolset and driver for Nokia mobile phones. * + * Copyright (C) 1999, 2000 Hugh Blemings & Pavel Janík ml. + * Copyright (C) 2000-2001 Marcel Holtmann + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either @@ -20,23 +23,45 @@ * License along with this library; if not, write to the Free * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * + * $Log$ + * Revision 1.1.1.3 2002/04/03 00:08:06 short + * Found in "gnokii-working" directory, some November-patches version + * + * Revision 1.2 2001/02/21 19:57:03 chris + * More fiddling with the directory layout + * + * Revision 1.1 2001/02/16 14:29:51 chris + * Restructure of common/. Fixed a problem in fbus-phonet.c + * Lots of dprintfs for Marcin + * Any size xpm can now be loaded (eg for 7110 startup logos) + * nk7110 code detects 7110/6210 and alters startup logo size to suit + * Moved Marcin's extended phonebook code into gnokii.c + * + * Revision 1.2 2001/02/12 15:13:46 chris + * Fixed my bug in xgnokii_contacts.c and added to tekram.c + * + * Revision 1.1 2001/02/09 18:12:53 chris + * Marcel's tekram support + * */ #include +#include +#include +#include #include #ifndef WIN32 - #include - #include - #include - #include "devices/unixserial.h" +#include "devices/unixserial.h" #else - #include - #include "devices/winserial.h" +#include "winserial.h" #endif #include "devices/tekram.h" + + + int tekram_open(__const char *__file) { return (serial_open(__file, O_RDWR | O_NOCTTY | O_NONBLOCK)); @@ -51,9 +76,18 @@ void tekram_close(int __fd) { void tekram_reset(int __fd) { - serial_setdtrrts(__fd, 0, 0); usleep(50000); - serial_setdtrrts(__fd, 1, 0); usleep(1000); - serial_setdtrrts(__fd, 1, 1); usleep(50); + serial_setdtrrts(__fd, 0, 0); + + usleep(50000); + + serial_setdtrrts(__fd, 1, 0); + + usleep(1000); + + serial_setdtrrts(__fd, 1, 1); + + usleep(50); + serial_changespeed(__fd, 9600); }