|
楼主 |
发表于 2006-7-16 22:07:29
|
显示全部楼层
int modem_reset(struct modem *m)
{
static int sregs_init(unsigned char sregs[]);
MODEM_DBG("modem reset...\n");
if(m->state != STATE_MODEM_IDLE)
modem_hup(m,1);
else if(m->started)
modem_stop(m);
else if(m->hook)
modem_set_hook(m,MODEM_HOOK_ON);
modem_set_state(m, STATE_MODEM_IDLE);
m->command = 1;
m->min_rate = MODEM_MIN_RATE;
m->max_rate = MODEM_MAX_RATE;
sregs_init(m->sregs);
modem_homolog_init(m,m->homolog->id,NULL);
modem_set_mode(m, MODEM_MODE_DATA);
return 0;
}
/*
* Init functions
*
*/
/* set default init values */
static int sregs_init(unsigned char sregs[])
{
sregs[SREG_ESCAPE_CHAR] = '+' ; /* escape char */
sregs[SREG_CR_CHAR] = '\r'; /* cr char */
sregs[SREG_LF_CHAR] = '\n'; /* lf char */
sregs[SREG_BS_CHAR] = '\b'; /* bs char */
sregs[SREG_DIAL_TONE_WAIT_TIME] = 2; /* seconds */
sregs[SREG_WAIT_CARRIER_AFTER_DIAL] = 60; /* seconds */
sregs[SREG_DIAL_PAUSE_TIME] = 2; /* seconds */
sregs[SREG_CARRIER_DETECT_RESPONSE_TIME] = 6; /* 0.1 sec */
sregs[SREG_CARRIER_LOSS_DISCONNECT_TIME] = 7; /* 0.1 sec */
sregs[SREG_DTMF_DURATION] = 100; /* ms */
sregs[SREG_ESCAPE_PROMPT_DELAY] = 50; /* ms */
sregs[SREG_FLASH_TIMER] = 20; /* 10ms */
sregs[SREG_ECHO] = 1; /* yes */
sregs[SREG_QUIET] = 0; /* no */
sregs[SREG_VERBOSE] = 1; /* yes */
sregs[SREG_TONE_OR_PULSE] = 1; /* tone */
sregs[SREG_X_CODE] = 4;
sregs[SREG_SPEAKER_CONTROL] = 1; /* yes */
sregs[SREG_SPEAKER_VOLUME] = 3; /* max */
sregs[SREG_AUTOMODE] = 1; /* yes */
sregs[SREG_DP] = DP_V92;
sregs[SREG_ANS_DELAY] = 2; /* seconds */
sregs[SREG_LINE_QUALITY_CONTROL] = 0;
sregs[SREG_CD] = 0;
sregs[SREG_FLOW_CONTROL] = 0;
sregs[SREG_CONNNECT_MSG_FORMAT] = 0;
sregs[SREG_CONNNECT_MSG_SPEED_SRC] = 0;
/* new sregs */
sregs[SREG_EC] = 1;
sregs[SREG_COMP] = 0x3;
return 0;
}
查看了下出错的modem.c程序,发现gcc在编译时不允许static型的函数声明出现在函数定义中,而static和非static函数的区别似乎只在于是否在定义函数的文件外可见,这样我就先把static去掉了(寒。。)编译成功。。
不过执行make install还有一片的问题。。。。
问下FC5安装没安装内核的源码,在哪个路径下? |
|