Add support for ultra high-speed baud rates.
This commit is contained in:
parent
05699cb948
commit
f94e751dd0
@ -32,6 +32,8 @@ int mdm_init()
|
||||
mdm_responses[MDM_RESP_CONNECT_57600] = "CONNECT 57600";
|
||||
mdm_responses[MDM_RESP_CONNECT_115200] = "CONNECT 115200";
|
||||
mdm_responses[MDM_RESP_CONNECT_230400] = "CONNECT 230400";
|
||||
mdm_responses[MDM_RESP_CONNECT_460800] = "CONNECT 460800";
|
||||
mdm_responses[MDM_RESP_CONNECT_921600] = "CONNECT 921600";
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -41,6 +43,12 @@ int get_connect_response(int speed, int level)
|
||||
return MDM_RESP_CONNECT;
|
||||
}
|
||||
switch (speed) {
|
||||
case 921600:
|
||||
return MDM_RESP_CONNECT_921600;
|
||||
case 460800:
|
||||
return MDM_RESP_CONNECT_460800;
|
||||
case 230400:
|
||||
return MDM_RESP_CONNECT_230400;
|
||||
case 115200:
|
||||
return MDM_RESP_CONNECT_115200;
|
||||
case 57600:
|
||||
|
@ -22,6 +22,8 @@
|
||||
#define MDM_RESP_CONNECT_57600 18
|
||||
#define MDM_RESP_CONNECT_115200 19
|
||||
#define MDM_RESP_CONNECT_230400 20
|
||||
#define MDM_RESP_CONNECT_460800 21
|
||||
#define MDM_RESP_CONNECT_921600 22
|
||||
|
||||
#define MDM_CL_DSR_LOW 0
|
||||
#define MDM_CL_DSR_HIGH 1
|
||||
|
@ -16,6 +16,12 @@ int ser_get_bps_const(int speed)
|
||||
LOG(LOG_DEBUG, "Checking speed: %d", speed);
|
||||
|
||||
switch (speed) {
|
||||
case 921600:
|
||||
bps_rate = B921600;
|
||||
break;
|
||||
case 460800:
|
||||
bps_rate = B460800;
|
||||
break;
|
||||
case 230400:
|
||||
bps_rate = B230400;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user