帮忙看一下,ch375更改波特率的程序哪个地方有问题。试了一天了没找到问题在哪儿。
uint8_tInitCH375Host( void )
{
//delay_nms(50);
CH375_PORT_INIT( );
Uart1Init(9600);
xWriteCH375Cmd( CMD_SET_BAUDRATE );
xWriteCH375Data( 0x03 );
xWriteCH375Data( 0xCC );
Uart1Init(115200);
delay_us( 20 );
hangongnum = xReadCH375Data( );
xWriteCH375Cmd( CMD_CHECK_EXIST );
xWriteCH375Data( 0x65 );
resm = xReadCH375Data( );
hanjinum = resm;
if ( resm != 0x9A ) return( ERR_USB_UNKNOWN );
xWriteCH375Cmd( CMD_SET_USB_MODE );
xWriteCH375Data( 0x06 );
delay_us( 20 );
resm = xReadCH375Data( );
CH375InitSysVar();
if ( resm == CMD_RET_SUCCESS ) return( USB_INT_SUCCESS );
else return( ERR_USB_UNKNOWN );
}