FreeCalypso > hg > freecalypso-sw
view miscutil/openport.c @ 884:353daaa6014d
gsm-fw/gpf/conf/gsmcomp.c: increased max partition in the voice-only config
The code we got from TCS211 had the maximum prim pool partition size set to
900 bytes in the voice-only config (no FAX_AND_DATA, no GPRS) and to 1600 bytes
in every other config. As it turns out, this "minimized" config breaks when
the AT command interface is used with %CPI enabled, as the responsible code in
ATI does an ACI_MALLOC of 1012 bytes. TI may have considered this case to be
unsupported usage (perhaps they didn't care about the combination of a
voice-only PS with AT command control), but we do want this use case to work
without crashing. Solution: I made the largest prim pool the same as it is
with FAX_AND_DATA: 3 partitions of 1600 bytes.
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Sat, 27 Jun 2015 07:31:30 +0000 |
parents | 3822f3b198d4 |
children |
line wrap: on
line source
/* * Serial port opening code for fc-serterm */ #include <sys/types.h> #include <sys/file.h> #include <sys/ioctl.h> #include <termios.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <strings.h> #include <unistd.h> extern int target_fd; static struct baudrate { char *name; speed_t termios_code; } baud_rate_table[] = { {"19200", B19200}, {"38400", B38400}, {"57600", B57600}, {"115200", B115200}, /* non-standard high baud rates "remapped" by CP2102 usb2serial IC */ {"203125", B230400}, {"406250", B460800}, {"812500", B921600}, /* table search terminator */ {NULL, B0} }; open_target_serial(ttydev, baudname) char *ttydev, *baudname; { struct termios target_termios; struct baudrate *br; for (br = baud_rate_table; br->name; br++) if (!strcmp(br->name, baudname)) break; if (!br->name) { fprintf(stderr, "baud rate \"%s\" unknown/unsupported\n", baudname); exit(1); } target_fd = open(ttydev, O_RDWR|O_NONBLOCK); if (target_fd < 0) { perror(ttydev); exit(1); } target_termios.c_iflag = IGNBRK; target_termios.c_oflag = 0; target_termios.c_cflag = CLOCAL|HUPCL|CREAD|CS8; target_termios.c_lflag = 0; target_termios.c_cc[VMIN] = 1; target_termios.c_cc[VTIME] = 0; cfsetispeed(&target_termios, br->termios_code); cfsetospeed(&target_termios, br->termios_code); if (tcsetattr(target_fd, TCSAFLUSH, &target_termios) < 0) { perror("initial tcsetattr on target"); exit(1); } return 0; }