新手上路
- 积分
- 26
- 金钱
- 26
- 注册时间
- 2020-3-13
- 在线时间
- 6 小时
|
楼主 |
发表于 2020-3-14 12:13:06
|
显示全部楼层
case 2: //4800
Baud_rate= 2;
UART_send1[0]=slave_address;
UART_send1[1]=0x06;
UART_send1[2]=0x00;
UART_send1[3]=0x3A;
UART_send1[4]=0x00;
UART_send1[5]=0x02;
Temp1 = mycrc16(UART_send1,6);
UART_send1[6] = (uint8_t)(Temp1>>8);
UART_send1[7] = (uint8_t)Temp1;
Usart0_Transmit(UART_send1,8);
WRITE_ONE_BYTE_TO_INT_EEPROM(Baud_rate_location, Baud_rate);
UART1_ITConfig(UART1_IT_RXNE,DISABLE);
UART1_ITConfig(UART1_IT_TXE,DISABLE);
while(!UART1_GetITStatus(UART1_IT_TC));
UART1_ITConfig(UART1_IT_RXNE_OR,DISABLE); //UART1_ITConfig(UART1_IT_RXNE,DISABLE); //
UART1_ITConfig(UART1_IT_TXE,DISABLE);
UART1_Cmd(DISABLE);
my_uart_init(Baud_rate,Evev_odd);
break; |
|