Changeset 1220 for trunk/csctapi/io_serial.c
- Timestamp:
- 01/14/10 12:09:19 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/csctapi/io_serial.c
r1209 r1220 170 170 io->mhz=mhz; 171 171 io->cardmhz=cardmhz; 172 printf("IO_SERIAL_NEW: cardmhz = %i\n",cardmhz); 172 173 173 174 return io; … … 176 177 bool IO_Serial_Init (IO_Serial * io, int reader_type) 177 178 { 178 char filename[IO_SERIAL_FILENAME_LENGTH]; 179 180 IO_Serial_DeviceName (filename, IO_SERIAL_FILENAME_LENGTH); 181 182 #ifdef DEBUG_IO 183 printf ("IO: Opening serial port %s\n", filename); 184 #endif 185 179 printf("IO_SERIAL_INIT\n"); 186 180 io->reader_type = reader_type; 187 188 #if defined(SCI_DEV) || defined(COOL) 189 if (reader_type==R_INTERNAL) 190 #ifdef SH4 191 io->fd = open (filename, O_RDWR|O_NONBLOCK|O_NOCTTY); 192 #elif COOL 193 return Cool_Init(); 194 #else 195 io->fd = open (filename, O_RDWR); 196 #endif 197 else 198 #endif 199 200 //#ifdef OS_MACOSX 201 // on mac os x, make sure you use the /dev/cu.XXXX device in oscam.server 202 io->fd = open (filename, O_RDWR | O_NOCTTY| O_NONBLOCK); 203 //#else 204 // with O_SYNC set OSCam is very critical on opening a device, on certain installs 205 // (eg virtual Ubuntu with /dev/ttyUSB) it gives "Error activating card" 206 // with O_NONBLOCK this problem is solved 207 // io->fd = open (filename, O_RDWR | O_NOCTTY | O_SYNC); 208 //#endif 209 210 if (io->fd < 0) 211 return FALSE; 212 213 #if defined(TUXBOX) && defined(PPC) 214 if ((reader_type == R_DB2COM1) || (reader_type == R_DB2COM2)) 215 if ((fdmc = open(DEV_MULTICAM, O_RDWR)) < 0) 216 { 217 close(io->fd); 218 return FALSE; 219 } 220 #endif 221 181 io->fd = reader[ridx].handle; 182 222 183 if (reader_type != R_INTERNAL) 223 184 IO_Serial_InitPnP (io);
Note:
See TracChangeset
for help on using the changeset viewer.