Imported gammu 0.90.7
[gammu.git] / common / device / serial / ser_djg.c
blob1256ab26c783a7564b7089ea552537b6cf1ae96d
2 #include "../../gsmstate.h"
4 #ifdef GSM_ENABLE_SERIALDEVICE
5 #ifdef DJGPP
7 #include "../../gsmcomon.h"
8 #include "ser_djg.h"
10 /* Close the serial port and restore old settings. */
11 static GSM_Error serial_close(GSM_StateMachine *s)
13 GSM_Device_SerialData *d = &s->Device.Data.Serial;
15 return GE_NONE;
18 static GSM_Error serial_open (GSM_StateMachine *s)
20 GSM_Device_SerialData *d = &s->Device.Data.Serial;
22 return GE_NONE;
25 static GSM_Error serial_setparity(GSM_StateMachine *s, bool parity)
27 GSM_Device_SerialData *d = &s->Device.Data.Serial;
29 return GE_NONE;
32 /* Set the DTR and RTS bit of the serial device. */
33 static GSM_Error serial_setdtrrts(GSM_StateMachine *s, bool dtr, bool rts)
35 GSM_Device_SerialData *d = &s->Device.Data.Serial;
37 return GE_NONE;
38 // return GE_DEVICEDTRRTSERROR;
41 /* Change the speed of the serial device.
42 * RETURNS: Success
44 static GSM_Error serial_setspeed(GSM_StateMachine *s, int speed)
46 GSM_Device_SerialData *d = &s->Device.Data.Serial;
47 return GE_NONE;
50 /* Read from serial device. */
51 static int serial_read(GSM_StateMachine *s, void *buf, size_t nbytes)
53 GSM_Device_SerialData *d = &s->Device.Data.Serial;
54 return 0;
57 /* Write to serial device. */
58 static int serial_write(GSM_StateMachine *s, void *buf, size_t nbytes)
60 GSM_Device_SerialData *d = &s->Device.Data.Serial;
61 return 0;
64 GSM_Device_Functions SerialDevice = {
65 serial_open,
66 serial_close,
67 serial_setparity,
68 serial_setdtrrts,
69 serial_setspeed,
70 serial_read,
71 serial_write
74 #endif
75 #endif
77 /* How should editor hadle tabs in this file? Add editor commands here.
78 * vim: noexpandtab sw=8 ts=8 sts=8: