幫忙看一下,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 );
}