CH374與CP2102通信的波特率設置函數(shù)CP2102_Bound_Data:是只能設下面那些波特率嗎,115200被注釋掉了是不是表示也不行?是因為速度太快就不行嗎?(事實上我115200和128000都沒試通。。)謝謝!
UINT16 CP2102_Bound_Data( unsigned short Bound_D )//輸入數(shù)據是波特率,輸出數(shù)據是波特率除數(shù) { unsigned short Bound_Data; switch (Bound_D){ case 600: Bound_Data=0x1800;break; case 1200: Bound_Data=0x0c00;break; case 2400: Bound_Data=0x0600;break; case 4800: Bound_Data=0x0300;break; case 9600: Bound_Data=0x0180;break; case 19200: Bound_Data=0x00c0;break; case 38400: Bound_Data=0x0060;break; /*case 115200: Bound_Data=0x0020;break;*/
default: break; } return Bound_Data; }